PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Finance/GDataEntryFinanceTransaction.m

http://macfuse.googlecode.com/
Objective C | 84 lines | 42 code | 25 blank | 17 comment | 1 complexity | 15f74f1f946dbeec8c9e80977ec7dbdd MD5 | raw file
 1/* Copyright (c) 2008 Google Inc.
 2*
 3* Licensed under the Apache License, Version 2.0 (the "License");
 4* you may not use this file except in compliance with the License.
 5* You may obtain a copy of the License at
 6*
 7*     http://www.apache.org/licenses/LICENSE-2.0
 8*
 9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15
16//
17//  GDataEntryFinanceTransaction.m
18//
19
20#if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_FINANCE_SERVICE
21
22#import "GDataEntryFinanceTransaction.h"
23
24#import "GDataFinanceTransactionData.h"
25
26#import "GDataEntryFinancePortfolio.h" // for namespace and constants
27
28@implementation GDataEntryFinanceTransaction
29
30+ (GDataEntryFinanceTransaction *)transactionEntry {
31  
32  GDataEntryFinanceTransaction *obj;
33  obj = [self object];
34  
35  [obj setNamespaces:[GDataEntryFinancePortfolio financeNamespaces]];
36  
37  return obj;
38}
39
40#pragma mark -
41
42+ (NSString *)standardEntryKind {
43  return kGDataCategoryFinanceTransaction;
44}
45
46+ (void)load {
47  [self registerEntryClass];
48}
49
50- (void)addExtensionDeclarations {
51  
52  [super addExtensionDeclarations];
53  
54  [self addExtensionDeclarationForParentClass:[self class]
55                                   childClass:[GDataFinanceTransactionData class]];  
56}
57
58#if !GDATA_SIMPLE_DESCRIPTIONS
59- (NSMutableArray *)itemsForDescription {
60  
61  NSMutableArray *items = [super itemsForDescription];
62  
63  [self addToArray:items objectDescriptionIfNonNil:[self transactionData] withName:@"transaction"];
64  
65  return items;
66}
67#endif
68
69+ (NSString *)defaultServiceVersion {
70  return kGDataFinanceDefaultServiceVersion;
71}
72
73#pragma mark -
74
75- (void)setTransactionData:(GDataFinanceTransactionData *)obj {
76  [self setObject:obj forExtensionClass:[GDataFinanceTransactionData class]];
77}
78
79- (GDataFinanceTransactionData *)transactionData {
80  return [self objectForExtensionClass:[GDataFinanceTransactionData class]]; 
81}
82@end
83
84#endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_FINANCE_SERVICE