|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The PersistenceContainer is the object needed by PersistableEntity. It holds all attribute values and links transiently during runtime. PersistableEntity should only be used as wrapper around the PersistenceContainer.
Method Summary | |
void |
addMultipleLink(int idx,
PersistableEntity link)
Add a new Link entry to the multiple link at given index of the PersistedObject. |
java.lang.Object |
getAttribute(int idx)
Gets the value of the attribute a given index |
java.lang.Object |
getAttribute(int idx,
int mult)
Gets the value of the attribute a given index |
java.lang.String |
getClasstype()
Gets the classtype supported by this PersistenceContainer |
java.lang.String |
getKey()
Gets the entityKey attribute of the PersistedObject object |
MeIterator |
getMultipleLink(int idx)
|
PersistableEntity |
getMultipleLink(int idx,
int mult)
Returns the multiple link at the given index. |
PersistableEntity |
getSingleLink(int idx)
get the link at index idx as an Entity |
boolean |
isMultipleLink(int idx)
return the number of links available for the given index |
void |
removeAllMultipleLink(int idx)
clear all links at given index |
void |
removeMultipleLink(int idx,
int mult)
removes the multiple link at given index Each item in this linkwith an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. |
void |
removeSingleLink(int idx)
Clears the link. |
void |
setAttribute(int idx,
int mult,
java.lang.Object object)
Sets the attribute attribute of the PersistedObject object |
void |
setAttribute(int idx,
java.lang.Object object)
Sets the attribute attribute of the PersistedObject object |
void |
setEntity(PersistableEntity entity)
set the entity belonging to this PersistenceContainer |
void |
setMultipleLink(int idx,
int mult,
PersistableEntity link)
Sets a multiple link entry at the given index of the PersistedObject. |
void |
setSingleLink(int idx,
PersistableEntity link)
Sets the link attribute of the PersistedObject object |
int |
sizeAttribute()
return the number of attributes |
int |
sizeAttribute(int idx)
return the size of the multiple link attribute |
int |
sizeLink()
return the number of link attributes |
int |
sizeLink(int idx)
Returns the size of the multiple link attribute. |
Method Detail |
public java.lang.String getClasstype()
public java.lang.String getKey()
public void setEntity(PersistableEntity entity)
entity
- the PersistableEntity objectpublic java.lang.Object getAttribute(int idx)
idx
- The parameter index
java.lang.IndexOutOfBoundsException
- if idx is out of bound
java.lang.IllegalArgumentException
- if link at idx is not singlepublic java.lang.Object getAttribute(int idx, int mult)
idx
- The parameter indexmult
- the multiple index
java.lang.IndexOutOfBoundsException
- if idx or mult is out of bound
java.lang.IllegalArgumentException
- if link at idx is not multiplepublic void setAttribute(int idx, java.lang.Object object)
object
- The new attribute valueidx
- The new attribute value
PersistenceException
- Description of the Exception
java.lang.IndexOutOfBoundsException
- if index is out of bound
java.lang.IllegalArgumentException
- if link at idx is not singlepublic void setAttribute(int idx, int mult, java.lang.Object object)
idx
- The attribute indexmult
- The multiple indexobject
- The new attribute value
PersistenceException
- Description of the Exception
java.lang.IndexOutOfBoundsException
- if idx or mult is out of bound
java.lang.IllegalArgumentException
- if link at idx is not multiplepublic int sizeAttribute()
public int sizeAttribute(int idx)
java.lang.IndexOutOfBoundsException
- if idx or mult is out of boundpublic PersistableEntity getSingleLink(int idx)
idx
- the link index
java.lang.IndexOutOfBoundsException
- is out of bound
java.lang.IllegalArgumentException
- if link at idx is not singlepublic void setSingleLink(int idx, PersistableEntity link)
idx
- the link indexlink
- The new link value
PersistenceException
- if link cannot set
java.lang.IndexOutOfBoundsException
- is out of bound
java.lang.IllegalArgumentException
- if link at idx is not singlepublic void removeSingleLink(int idx)
idx
- the link index
java.lang.IndexOutOfBoundsException
- is out of bound
java.lang.IllegalArgumentException
- if link at idx is not singlepublic PersistableEntity getMultipleLink(int idx, int mult)
Use carefully, because it triggers lazy loading of all link entries into memory with jdbc persistence!
idx
- the link indexmult
- the multiple index
java.lang.IndexOutOfBoundsException
- if idx or mult is out of bound
java.lang.IllegalArgumentException
- if link at idx is not multiplepublic void setMultipleLink(int idx, int mult, PersistableEntity link)
Use carefully, because it triggers lazy loading of all link entries into memory with jdbc persistence!
idx
- the link indexmult
- the multiple indexlink
- the new link value
PersistenceException
- Description of the Exception
java.lang.IndexOutOfBoundsException
- if idx or mult is out of bound
java.lang.IllegalArgumentException
- if link at idx is not multiplepublic void addMultipleLink(int idx, PersistableEntity link)
Use carefully, because it triggers lazy loading of all link entries into memory with jdbc persistence!
idx
- the link indexlink
- The new link value
PersistenceException
- Description of the Exception
java.lang.IndexOutOfBoundsException
- if idx or mult is out of bound
java.lang.IllegalArgumentException
- if link at idx is not multiplepublic void removeMultipleLink(int idx, int mult)
idx
- the link indexmult
- the multiple index
java.lang.IndexOutOfBoundsException
- if idx or mult is out of bound
java.lang.IllegalArgumentException
- if link at idx is not multiplepublic void removeAllMultipleLink(int idx)
idx
- the link index
java.lang.IndexOutOfBoundsException
- if idx or mult is out of boundpublic int sizeLink()
public int sizeLink(int idx)
Use carefully, because it triggers lazy loading of all link entries into memory with jdbc persistence!
java.lang.IndexOutOfBoundsException
- if idx or mult is out of boundpublic boolean isMultipleLink(int idx)
idx
- the link index
java.lang.IndexOutOfBoundsException
- if idx or mult is out of boundpublic MeIterator getMultipleLink(int idx)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |