|
@@ -4,16 +4,13 @@ |
4 |
4 |
|
import org.litesoft.aokeyhole.objects.*; |
5 |
5 |
|
import org.litesoft.codegen.*; |
6 |
6 |
|
|
7 |
|
- |
public class GeneratePOMetaData extends AbstractPOFileGenerator |
8 |
|
- |
{ |
9 |
|
- |
public GeneratePOMetaData( ErrorSinc pErrorSinc, ObjectMetaData pObjectMetaData, ObjectRef pObjectRef, ObjectRef pParentObjectRef, boolean pIsParent ) |
10 |
|
- |
{ |
|
7 |
+ |
public class GeneratePOMetaData extends AbstractPOFileGenerator { |
|
8 |
+ |
public GeneratePOMetaData( ErrorSinc pErrorSinc, ObjectMetaData pObjectMetaData, ObjectRef pObjectRef, ObjectRef pParentObjectRef, boolean pIsParent ) { |
11 |
9 |
|
super( pErrorSinc, pObjectMetaData, pObjectRef, "MetaData", pParentObjectRef, pIsParent ); |
12 |
10 |
|
} |
13 |
11 |
|
|
14 |
12 |
|
@Override |
15 |
|
- |
protected void LLaddImports() |
16 |
|
- |
{ |
|
13 |
+ |
protected void LLaddImports() { |
17 |
14 |
|
addImports( // |
18 |
15 |
|
!mIsParent ? "org.litesoft.core.util.*" : null, // |
19 |
16 |
|
!mIsParent ? "org.litesoft.orsup.transact.*" : null, // |
|
@@ -22,33 +19,27 @@ |
22 |
19 |
|
} |
23 |
20 |
|
|
24 |
21 |
|
@Override |
25 |
|
- |
protected void LLaddClassDefinition() |
26 |
|
- |
{ |
27 |
|
- |
if ( mIsParent ) |
28 |
|
- |
{ |
|
22 |
+ |
protected void LLaddClassDefinition() { |
|
23 |
+ |
if ( mIsParent ) { |
29 |
24 |
|
makeClassAbstract(); |
30 |
25 |
|
addClassDefinition( mClassName + "<T extends " + mObjectName + ">", mObjectName + "GO.MyMetaData<T>" ); |
31 |
|
- |
} |
32 |
|
- |
else |
33 |
|
- |
{ |
|
26 |
+ |
} else { |
34 |
27 |
|
addClassDefinition( mClassName, mObjectName + "GO.MyMetaData" ); |
35 |
28 |
|
} |
36 |
29 |
|
} |
37 |
30 |
|
|
38 |
31 |
|
@Override |
39 |
|
- |
protected void LLaddClassBody() |
40 |
|
- |
{ |
41 |
|
- |
if ( mIsParent ) |
42 |
|
- |
{ |
43 |
|
- |
addConstructorProtected( mClassName, "String pIdentifierName", "String pTableName", "AttributeAccessorKeySet pAttributeAccessorKeySet", "AttributeAccessorSCD... pAccessorSCDs" ); |
|
32 |
+ |
protected void LLaddClassBody() { |
|
33 |
+ |
if ( mIsParent ) { |
|
34 |
+ |
addConstructorProtected( mClassName, "String pIdentifierName", "String pTableName", "AttributeAccessorKeySet pAttributeAccessorKeySet", |
|
35 |
+ |
"AttributeAccessorSCD... pAccessorSCDs" ); |
44 |
36 |
|
addLine( "super( pIdentifierName, pTableName, pAttributeAccessorKeySet, pAccessorSCDs );" ); |
45 |
37 |
|
addMethodEnd(); |
46 |
|
- |
addConstructorProtected( mClassName, "AttributeAccessorSCD[] pAccessorSCDs", "String pIdentifierName", "String pTableName", "AttributeAccessorKeySet pAttributeAccessorKeySet", "AttributeAccessorSCD... pMoreAccessorSCDs" ); |
|
38 |
+ |
addConstructorProtected( mClassName, "AttributeAccessorSCD[] pAccessorSCDs", "String pIdentifierName", "String pTableName", |
|
39 |
+ |
"AttributeAccessorKeySet pAttributeAccessorKeySet", "AttributeAccessorSCD... pMoreAccessorSCDs" ); |
47 |
40 |
|
addLine( "super( pAccessorSCDs, pIdentifierName, pTableName, pAttributeAccessorKeySet, pMoreAccessorSCDs );" ); |
48 |
41 |
|
addBlockEnd(); |
49 |
|
- |
} |
50 |
|
- |
else |
51 |
|
- |
{ |
|
42 |
+ |
} else { |
52 |
43 |
|
addLine( "public static final " + mClassName + " INSTANCE = new " + mClassName + "();" ); |
53 |
44 |
|
addBlankLine(); |
54 |
45 |
|
addConstructorPrivate( mClassName ); |