|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.meta.ValueMetaDataImpl
public class ValueMetaDataImpl
Default ValueMetaData
implementation.
Field Summary |
---|
Fields inherited from interface org.apache.openjpa.meta.ValueMetaData |
---|
CASCADE_AUTO, CASCADE_IMMEDIATE, CASCADE_NONE, MAPPED_BY_PK |
Fields inherited from interface org.apache.openjpa.meta.MetaDataModes |
---|
MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY |
Constructor Summary | |
---|---|
protected |
ValueMetaDataImpl(FieldMetaData owner)
|
Method Summary | |
---|---|
ClassMetaData |
addEmbeddedMetaData()
Add embedded metadata for this value. |
void |
copy(ValueMetaData vmd)
Copy state from the given value to this one. |
int |
getCascadeAttach()
Cascade behavior for attach operation. |
int |
getCascadeDelete()
Cascade behavior for delete operation. |
int |
getCascadePersist()
Cascade behavior for persist operation. |
int |
getCascadeRefresh()
Cascade behavior for refresh operation. |
Class |
getDeclaredType()
Return the declared class of the value. |
int |
getDeclaredTypeCode()
Return the declared type code of the value. |
ClassMetaData |
getDeclaredTypeMetaData()
Return metadata for the value's class, if the type is persistent. |
ClassMetaData |
getEmbeddedMetaData()
The embedded class metadata for the value. |
FieldMetaData |
getFieldMetaData()
Return the owning field for this value. |
MetaDataRepository |
getRepository()
Access metadata repository. |
int |
getResolve()
Resolve mode for metadata. |
Class |
getType()
The value class. |
int |
getTypeCode()
The type code of the value class. |
ClassMetaData |
getTypeMetaData()
The metadata for the value class, if the type is persistent. |
Class |
getTypeOverride()
User-supplied type overriding assumed type based on field. |
String |
getValueMappedBy()
The field that this value shares a mapping with. |
FieldMetaData |
getValueMappedByMetaData()
The field that this value shares a mapping with. |
boolean |
isDeclaredTypePC()
Whether the type is a persistence capable instance. |
boolean |
isEmbedded()
This attribute is a hint to the implementation to store this value in the same structure as the class, rather than as a separate datastore structure. |
boolean |
isEmbeddedPC()
Whether this is an embedded persistence capable value. |
boolean |
isSerialized()
Whether this value is serialized when stored. |
boolean |
isTypePC()
Whether the type is a persistence capable instance. |
boolean |
resolve(int mode)
Resolve and validate metadata. |
void |
setCascadeAttach(int attach)
Cascade behavior for attach operation. |
void |
setCascadeDelete(int delete)
Cascade behavior for deletion. |
void |
setCascadePersist(int persist)
Cascade behavior for persist operation. |
void |
setCascadeRefresh(int refresh)
Cascade behavior for refresh operation. |
void |
setDeclaredType(Class type)
Set the declared class of the value. |
void |
setDeclaredTypeCode(int code)
Set the type code for the value. |
void |
setEmbedded(boolean embedded)
This attribute is a hint to the implementation to store this value in the same structure as the class, rather than as a separate datastore structure. |
void |
setResolve(int mode)
Resolve mode for metadata. |
void |
setResolve(int mode,
boolean on)
Resolve mode for metadata. |
void |
setSerialized(boolean serialized)
Whether this value is serialized when stored. |
void |
setType(Class type)
The value class. |
void |
setTypeCode(int code)
The type code of the value class. |
void |
setTypeOverride(Class val)
User-supplied type overriding assumed type based on field. |
void |
setValueMappedBy(String mapped)
The field that this value shares a mapping with. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ValueMetaDataImpl(FieldMetaData owner)
Method Detail |
---|
public FieldMetaData getFieldMetaData()
ValueMetaData
getFieldMetaData
in interface ValueMetaData
public MetaDataRepository getRepository()
MetaDataContext
getRepository
in interface MetaDataContext
public Class getType()
ValueMetaData
getType
in interface ValueMetaData
public void setType(Class type)
ValueMetaData
setType
in interface ValueMetaData
public int getTypeCode()
ValueMetaData
getTypeCode
in interface ValueMetaData
public void setTypeCode(int code)
ValueMetaData
setTypeCode
in interface ValueMetaData
public boolean isTypePC()
ValueMetaData
isTypePC
in interface ValueMetaData
public ClassMetaData getTypeMetaData()
ValueMetaData
getTypeMetaData
in interface ValueMetaData
public Class getDeclaredType()
ValueMetaData
ValueMetaData.getType()
if the user indicates
a different type or the value has an externalizer.
getDeclaredType
in interface ValueMetaData
public void setDeclaredType(Class type)
ValueMetaData
setDeclaredType
in interface ValueMetaData
public int getDeclaredTypeCode()
ValueMetaData
ValueMetaData.getTypeCode()
if the user indicates
a different type or the value has an externalizer.
getDeclaredTypeCode
in interface ValueMetaData
public void setDeclaredTypeCode(int code)
ValueMetaData
setDeclaredTypeCode
in interface ValueMetaData
public boolean isDeclaredTypePC()
ValueMetaData
isDeclaredTypePC
in interface ValueMetaData
public ClassMetaData getDeclaredTypeMetaData()
ValueMetaData
getDeclaredTypeMetaData
in interface ValueMetaData
public boolean isEmbedded()
ValueMetaData
isEmbedded
in interface ValueMetaData
public void setEmbedded(boolean embedded)
ValueMetaData
setEmbedded
in interface ValueMetaData
public boolean isEmbeddedPC()
ValueMetaData
isEmbeddedPC
in interface ValueMetaData
public ClassMetaData getEmbeddedMetaData()
ValueMetaData
getEmbeddedMetaData
in interface ValueMetaData
public ClassMetaData addEmbeddedMetaData()
ValueMetaData
addEmbeddedMetaData
in interface ValueMetaData
public int getCascadeDelete()
ValueMetaData
CASCADE_NONE
: No cascades.CASCADE_IMMEDIATE
: Value is deleted immediately when
the owning object is deleted.CASCADE_AUTO
: Value will be deleted on flush
if the owning object is deleted or if the value is removed from the
owning object, and if the value is not assigned to another relation in
the same transaction.
getCascadeDelete
in interface ValueMetaData
public void setCascadeDelete(int delete)
ValueMetaData
setCascadeDelete
in interface ValueMetaData
ValueMetaData.getCascadeDelete()
public int getCascadePersist()
ValueMetaData
CASCADE_NONE
: No cascades. If a transient relation
is held at flush, an error is thrown.CASCADE_IMMEDIATE
: Value is persisted immediately when
the owning object is persisted.CASCADE_AUTO
: Value will be persisted on flush.
getCascadePersist
in interface ValueMetaData
public void setCascadePersist(int persist)
ValueMetaData
setCascadePersist
in interface ValueMetaData
ValueMetaData.getCascadePersist()
public int getCascadeAttach()
ValueMetaData
CASCADE_NONE
: No cascades of attach. Relation
remains detached.CASCADE_IMMEDIATE
: Value is attached immediately.
getCascadeAttach
in interface ValueMetaData
public void setCascadeAttach(int attach)
ValueMetaData
setCascadeAttach
in interface ValueMetaData
ValueMetaData.getCascadeAttach()
public int getCascadeRefresh()
ValueMetaData
CASCADE_NONE
: No cascades of refresh.CASCADE_IMMEDIATE
: Persistent value object is also
refreshed.CASCADE_AUTO
: Value will be refreshed if it is
in the current fetch groups.
getCascadeRefresh
in interface ValueMetaData
public void setCascadeRefresh(int refresh)
ValueMetaData
setCascadeRefresh
in interface ValueMetaData
ValueMetaData.getCascadeRefresh()
public boolean isSerialized()
ValueMetaData
isSerialized
in interface ValueMetaData
public void setSerialized(boolean serialized)
ValueMetaData
setSerialized
in interface ValueMetaData
public String getValueMappedBy()
ValueMetaData
getValueMappedBy
in interface ValueMetaData
public void setValueMappedBy(String mapped)
ValueMetaData
setValueMappedBy
in interface ValueMetaData
public FieldMetaData getValueMappedByMetaData()
ValueMetaData
getValueMappedByMetaData
in interface ValueMetaData
public Class getTypeOverride()
ValueMetaData
getTypeOverride
in interface ValueMetaData
public void setTypeOverride(Class val)
ValueMetaData
setTypeOverride
in interface ValueMetaData
public String toString()
toString
in class Object
public int getResolve()
ValueMetaData
getResolve
in interface ValueMetaData
public void setResolve(int mode)
ValueMetaData
setResolve
in interface ValueMetaData
public void setResolve(int mode, boolean on)
ValueMetaData
setResolve
in interface ValueMetaData
public boolean resolve(int mode)
ValueMetaData
resolve
in interface ValueMetaData
public void copy(ValueMetaData vmd)
ValueMetaData
copy
in interface ValueMetaData
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |