private static RelationField aRelationField(final String name, final BusinessObject reference) { final RelationField relationField = new RelationField(); relationField.setName(name); relationField.setReference(reference); return relationField; }
public FieldBuilder withLength(final int length) { ((SimpleField) field).setLength(length); return this; } }
private boolean isCollectionField(final Field field) { if (field == null) { return false; } final Boolean collection = field.isCollection(); return collection != null && collection; }
public String getGetterName(final Field field) { final boolean bool = field instanceof SimpleField && FieldType.BOOLEAN.equals(((SimpleField) field).getType()) && !field.isCollection(); return getGetterName(bool, field.getName()); }
public SimpleFieldBuilder ofType(final FieldType type) { ((SimpleField) field).setType(type); return this; }
private boolean isACompositionField(Field field) { return field instanceof RelationField && Type.COMPOSITION == ((RelationField) field).getType(); }
public SimpleFieldBuilder() { super(new SimpleField()); }
public RelationFieldBuilder ofType(final Type type) { ((RelationField) field).setType(type); return this; }
public RelationFieldBuilder lazy() { ((RelationField) field).setFetchType(LAZY); return this; }
public RelationFieldBuilder referencing(final BusinessObject bo) { ((RelationField) field).setReference(bo); return this; }
public FieldBuilder multiple(final boolean collection) { field.setCollection(collection); return this; }
public FieldBuilder notNullable() { field.setNullable(false); return this; }
public FieldBuilder withName(final String name) { field.setName(name); return this; }
public String getGetterName(final Field field) { final boolean bool = field instanceof SimpleField && FieldType.BOOLEAN.equals(((SimpleField) field).getType()) && !field.isCollection(); return getGetterName(bool, field.getName()); }
private boolean isCollectionField(final Field field) { if (field == null) { return false; } final Boolean collection = field.isCollection(); return collection != null && collection; }
public RelationFieldBuilder composition() { ((RelationField) field).setType(Type.COMPOSITION); return this; }
public RelationFieldBuilder fetchType(final FetchType fetchType) { ((RelationField) field).setFetchType(fetchType); return this; }
public FieldBuilder multiple() { field.setCollection(true); return this; }
public FieldBuilder nullable() { field.setNullable(true); return this; }
public RelationFieldBuilder aggregation() { ((RelationField) field).setType(Type.AGGREGATION); return this; }