|
@@ -7,6 +7,7 @@ |
7 |
7 |
|
import org.litesoft.aokeyhole.objects.properties.*; |
8 |
8 |
|
import org.litesoft.bo.attributes.*; |
9 |
9 |
|
import org.litesoft.codegen.*; |
|
10 |
+ |
import org.litesoft.commonfoundation.base.*; |
10 |
11 |
|
import org.litesoft.commonfoundation.typeutils.Objects; |
11 |
12 |
|
import org.litesoft.commonfoundation.typeutils.*; |
12 |
13 |
|
import org.litesoft.orsup.lazyeval.*; |
|
@@ -83,7 +84,7 @@ |
83 |
84 |
|
for ( AttributeProxy zAttribute : getAttributes() ) { |
84 |
85 |
|
if ( !zAttribute.isVirtual() ) { |
85 |
86 |
|
if ( A_PairedToOne.TYPE.equals( zAttribute.getAttributeSetType() ) ) { |
86 |
|
- |
String zToOne = Objects.justClassNameIfPackage( zAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
|
87 |
+ |
String zToOne = ClassName.simpleIfPackage( zAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
87 |
88 |
|
return zToOne + ".class"; |
88 |
89 |
|
} |
89 |
90 |
|
} |
|
@@ -544,8 +545,8 @@ |
544 |
545 |
|
mErrorSinc.addError( "CurrentlyUnsupportedAttributeType", pAttribute.toString(), mObjectMetaData.toStringForError() ); |
545 |
546 |
|
return; |
546 |
547 |
|
} |
547 |
|
- |
String zSimpleDataTypeSimpleName = Objects.justClassName( zSimpleDataTypeClass ); |
548 |
|
- |
String zSimpleDataType = Objects.justClassNameIfPackage( zSimpleDataTypeClass, JAVA_LANG_PACKAGE ); |
|
548 |
+ |
String zSimpleDataTypeSimpleName = ClassName.simple( zSimpleDataTypeClass ); |
|
549 |
+ |
String zSimpleDataType = ClassName.simpleIfPackage( zSimpleDataTypeClass, JAVA_LANG_PACKAGE ); |
549 |
550 |
|
|
550 |
551 |
|
String zDBtype = null; |
551 |
552 |
|
LiteSoftToJDBCtypeSupport zJDBCtypeSupport = !pAttribute.isVirtual() ? LiteSoftToJDBCtypeSupport.get( zSimpleDataTypeClass ) : null; |
|
@@ -778,7 +779,7 @@ |
778 |
779 |
|
|
779 |
780 |
|
private void addToOneRegular( AttributeProxy pAttribute, boolean pRequired, boolean pCascadeDeleteThem ) { |
780 |
781 |
|
String zName = pAttribute.getName(); |
781 |
|
- |
String zToOne = Objects.justClassNameIfPackage( pAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
|
782 |
+ |
String zToOne = ClassName.simpleIfPackage( pAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
782 |
783 |
|
String zGenericType = "<" + mObjectName + "," + zToOne + ">"; |
783 |
784 |
|
String zAAtype = "AttributeAccessorSCDtoOneRegular" + zGenericType; |
784 |
785 |
|
addLine( "public static final " + zAAtype + " CD_" + zName + " = new AttributeAccessor_" + zName + "();" ); |
|
@@ -881,7 +882,7 @@ |
881 |
882 |
|
|
882 |
883 |
|
private void addAttributeToOneVirtual( AttributeProxy pAttribute ) { |
883 |
884 |
|
String zName = pAttribute.getName(); |
884 |
|
- |
String zToOne = Objects.justClassNameIfPackage( pAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
|
885 |
+ |
String zToOne = ClassName.simpleIfPackage( pAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
885 |
886 |
|
String zGenericType = "<" + mObjectName + "," + zToOne + ">"; |
886 |
887 |
|
String zAAtype = "AttributeAccessorSCDtoOneVirtual" + zGenericType; |
887 |
888 |
|
addLine( "public static final " + zAAtype + " CD_" + zName + " = new AttributeAccessor_" + zName + "();" ); |
|
@@ -998,7 +999,7 @@ |
998 |
999 |
|
private void addAttributeToOnePaired( AttributeProxy pAttribute ) { |
999 |
1000 |
|
// A_PairedToOne.TYPE, pPersisted - Not Really Persisted - MetaData Driven for Object Reference; |
1000 |
1001 |
|
String zName = pAttribute.getName(); |
1001 |
|
- |
String zToOne = Objects.justClassNameIfPackage( pAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
|
1002 |
+ |
String zToOne = ClassName.simpleIfPackage( pAttribute.getToOneFullyQualifiedName(), mPackage + "." ); |
1002 |
1003 |
|
String zGenericType = "<" + mObjectName + "," + zToOne + ">"; |
1003 |
1004 |
|
String zAAtype = "AttributeAccessorSCDtoOnePaired" + zGenericType; |
1004 |
1005 |
|
addLine( "public static final " + zAAtype + " CD_" + zName + " = new AttributeAccessor_" + zName + "();" ); |
|
@@ -1079,7 +1080,7 @@ |
1079 |
1080 |
|
|
1080 |
1081 |
|
private void addToMany( String pForm, AttributeProxy pAttribute, boolean pCascadeDeleteThem ) { |
1081 |
1082 |
|
String zName = pAttribute.getName(); |
1082 |
|
- |
String zToMany = Objects.justClassNameIfPackage( pAttribute.getToManyFullyQualifiedName(), mPackage + "." ); |
|
1083 |
+ |
String zToMany = ClassName.simpleIfPackage( pAttribute.getToManyFullyQualifiedName(), mPackage + "." ); |
1083 |
1084 |
|
String zGenericType = "<" + mObjectName + "," + zToMany + ">"; |
1084 |
1085 |
|
String zAAtype = "AttributeAccessorSCDtoMany" + pForm + zGenericType; |
1085 |
1086 |
|
addLine( "public static final " + zAAtype + " CD_" + zName + " = new AttributeAccessor_" + zName + "();" ); |
|
@@ -1184,7 +1185,7 @@ |
1184 |
1185 |
|
|
1185 |
1186 |
|
private void addAttributeToManyVirtual( AttributeProxy pAttribute ) { |
1186 |
1187 |
|
String zName = pAttribute.getName(); |
1187 |
|
- |
String zToMany = Objects.justClassNameIfPackage( pAttribute.getToManyFullyQualifiedName(), mPackage + "." ); |
|
1188 |
+ |
String zToMany = ClassName.simpleIfPackage( pAttribute.getToManyFullyQualifiedName(), mPackage + "." ); |
1188 |
1189 |
|
String zGenericType = "<" + mObjectName + "," + zToMany + ">"; |
1189 |
1190 |
|
String zAAtype = "AttributeAccessorSCDtoManyVirtual" + zGenericType; |
1190 |
1191 |
|
addLine( "public static final " + zAAtype + " CD_" + zName + " = new AttributeAccessor_" + zName + "();" ); |