public abstract class AmberBeanType extends AbstractEnhancedType
Constructor and Description |
---|
AmberBeanType(AmberPersistenceUnit amberPersistenceUnit) |
Modifier and Type | Method and Description |
---|---|
void |
addCompletionField(java.lang.String name)
Adds a new completion field.
|
void |
addDependency(java.lang.Class cl)
Adds a dependency.
|
void |
addDependency(PersistentDependency depend)
Adds a dependency.
|
void |
addField(AmberField field)
Adds a new field.
|
boolean |
containsCompletionField(java.lang.String completionField)
Returns true if and only if it has the completion field.
|
java.lang.String |
generateCastFromObject(java.lang.String value)
Converts the value.
|
void |
generateExpire(JavaWriter out)
Generates any expiration code.
|
void |
generateInvalidateForeign(JavaWriter out)
Generates the foreign delete
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index,
int loadGroupIndex)
Generates a string to load the field.
|
abstract java.lang.String |
generateLoadSelect(AmberTable table,
java.lang.String id)
Generates the select clause for a load.
|
java.lang.String |
generateLoadSelect(AmberTable table,
java.lang.String id,
int loadGroup)
Generates the select clause for a load.
|
void |
generateLoadSelect(java.lang.StringBuilder sb,
AmberTable table,
java.lang.String id,
int loadGroup)
Generates the select clause for a load.
|
void |
generatePrePersist(JavaWriter out)
Returns the load mask generated on create.
|
long |
getCreateLoadMask(int group)
Returns the load mask generated on create.
|
java.util.ArrayList<PersistentDependency> |
getDependencies()
Gets the dependency.
|
AmberColumn |
getDiscriminator()
Returns the discriminator.
|
static java.lang.reflect.Field |
getField(java.lang.Class cl,
java.lang.String name)
Gets a matching getter.
|
AmberField |
getField(java.lang.String name)
Returns the field with a given name.
|
java.util.ArrayList<AmberField> |
getFields()
Returns the fields.
|
static java.lang.reflect.Method |
getGetter(java.lang.Class cl,
java.lang.String name)
Gets a matching getter.
|
java.lang.reflect.Method |
getGetter(java.lang.String name)
Gets a matching getter.
|
java.lang.String |
getJavaTypeName()
Returns the java type.
|
java.util.ArrayList<AmberField> |
getSelfFields()
Returns the fields declared on this instance
|
static java.lang.reflect.Method |
getSetter(java.lang.Class cl,
java.lang.String name)
Gets a matching getter.
|
void |
init()
Initialize the type.
|
boolean |
isEmbeddable()
Returns true for an embeddable
|
boolean |
isEntity() |
boolean |
isFieldAccess()
Set true for field-access.
|
void |
removeAllCompletionFields()
Remove all completion fields.
|
void |
setBeanClass(java.lang.Class beanClass)
Sets the bean class.
|
void |
setDiscriminator(AmberColumn discriminator)
Sets the discriminator.
|
void |
setFieldAccess(boolean isFieldAccess)
Set true for field-access.
|
boolean |
startConfigure()
Set true if configured.
|
addCallback, addPostLoadCallback, addPostPersistCallback, addPostRemoveCallback, addPostUpdateCallback, addPrePersistCallback, addPreRemoveCallback, addPreUpdateCallback, addStubMethod, getBeanClass, getCallbacks, getClassName, getComponentGenerator, getComponentInterfaceName, getConfigException, getInstance, getInstanceClass, getInstanceClass, getInstanceClassName, getJavaBeanClass, getMethods, getName, getPersistenceUnit, getPostLoadCallbacks, getPostPersistCallbacks, getPostRemoveCallbacks, getPostUpdateCallbacks, getPrePersistCallbacks, getPreRemoveCallbacks, getPreUpdateCallbacks, isEnhanced, isGenerated, isIdClass, isInit, setConfigException, setEnhanced, setGenerated, setIdClass, setInstance, setInstanceClassLoader, setInstanceClassName, setName, toString
findItem, fromObject, generateCreateColumnSQL, generateEquals, generateIncrementVersion, generateIsNull, generateLoad, generateLoad, generateLoadForeign, generateLoadNative, generateNull, generateSet, generateSetNull, generateSetVersion, getColumnCount, getForeignType, getForeignTypeName, getObject, getObject, isAssignableTo, isAutoIncrement, isBoolean, isNumeric, setParameter, toObject, toObject
public AmberBeanType(AmberPersistenceUnit amberPersistenceUnit)
public boolean isEntity()
public void setFieldAccess(boolean isFieldAccess)
public boolean isFieldAccess()
public boolean isEmbeddable()
public AmberColumn getDiscriminator()
public void setDiscriminator(AmberColumn discriminator)
public java.lang.String getJavaTypeName()
getJavaTypeName
in class AmberType
public void addField(AmberField field)
public java.util.ArrayList<AmberField> getSelfFields()
public java.util.ArrayList<AmberField> getFields()
public AmberField getField(java.lang.String name)
public void setBeanClass(java.lang.Class beanClass)
setBeanClass
in class AbstractEnhancedType
public void addDependency(java.lang.Class cl)
public void addDependency(PersistentDependency depend)
public java.util.ArrayList<PersistentDependency> getDependencies()
public void addCompletionField(java.lang.String name)
public boolean containsCompletionField(java.lang.String completionField)
public void removeAllCompletionFields()
public boolean startConfigure()
public void init() throws ConfigException
init
in class AmberType
ConfigException
public java.lang.String generateCastFromObject(java.lang.String value)
generateCastFromObject
in class AmberType
public void generateLoadSelect(java.lang.StringBuilder sb, AmberTable table, java.lang.String id, int loadGroup)
public int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index, int loadGroupIndex) throws java.io.IOException
java.io.IOException
public abstract java.lang.String generateLoadSelect(AmberTable table, java.lang.String id)
public java.lang.String generateLoadSelect(AmberTable table, java.lang.String id, int loadGroup)
public void generatePrePersist(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateInvalidateForeign(JavaWriter out) throws java.io.IOException
java.io.IOException
public void generateExpire(JavaWriter out) throws java.io.IOException
java.io.IOException
public java.lang.reflect.Method getGetter(java.lang.String name)
public static java.lang.reflect.Method getGetter(java.lang.Class cl, java.lang.String name)
public static java.lang.reflect.Field getField(java.lang.Class cl, java.lang.String name)
public static java.lang.reflect.Method getSetter(java.lang.Class cl, java.lang.String name)
public long getCreateLoadMask(int group)