litesoft
@ HEAD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
package org.litesoft.aokeyhole.swing.mains.mementobeans.support; import org.litesoft.aokeyhole.objects.*; import org.litesoft.aokeyhole.persist.*; import org.litesoft.commonfoundation.typeutils.*; import java.util.*; public class BeanObjectBuilder extends OADoneable implements ObjectBuilder { private final String mParentName; private final List<BeanAttributeBuilder> mAttributes = Lists.newArrayList(); public BeanObjectBuilder( String pType, String pName, String pParentName, String[] pNotes ) { super( objectID( pName ), pType, pName, pNotes ); mParentName = pParentName; } @Override public AttributeBuilder createAttributeBuilder( String pType, boolean pVirtual, String pName, String[] pNotes, String[] pAdditionalValues ) { checkCanDone(); boolean isRelated, addRepeating; isRelated = addRepeating = FundamentalAttributeType.ToMany.toString().equals( pType ); if ( !isRelated ) { isRelated = FundamentalAttributeType.ToOne.toString().equals( pType ); } if ( isRelated ) { pType = pAdditionalValues[0]; pAdditionalValues = null; } BeanAttributeBuilder zChild = child( new BeanAttributeBuilder( mName, pType, pVirtual, pName, pNotes, pAdditionalValues ) ); mAttributes.add( zChild ); if ( addRepeating ) { zChild.addProperty( BeanAttributeProperties.Repeating.name(), Boolean.TRUE.toString() ); } return zChild; } @Override protected String getWhyCantAddProperty() { return mAttributes.isEmpty() ? null : ATTRIBUTES_ALREADY_ADDED; } public String getParentName() { return mParentName; } public List<BeanAttributeBuilder> getAttributes() { return mAttributes; } } |
Commits for litesoft/trunk/Java/KeyHole/src/org/litesoft/aokeyhole/swing/mains/mementobeans/support/BeanObjectBuilder.java
Revision | Author | Commited | Message |
---|---|---|---|
948 Diff | GeorgeS | Sat 07 Jun, 2014 23:42:39 +0000 | Jusefuls Formatter Updated to New Code Format |
939 Diff | GeorgeS | Mon 02 Jun, 2014 21:30:31 +0000 | Extracting commonfoundation |
842 Diff | GeorgeS | Thu 06 Sep, 2012 19:15:51 +0000 | |
836 Diff | GeorgeS | Wed 05 Sep, 2012 15:01:18 +0000 | |
830 | GeorgeS | Fri 31 Aug, 2012 18:10:19 +0000 |