|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.extensions.AbstractUjo
org.ujoframework.implementation.quick.QuickUjo
org.ujoframework.implementation.orm.OrmTable<UJO_IMPL>
public class OrmTable<UJO_IMPL extends Ujo>
This abstract implementation of the OrmUjo interface is situable
for implementation the persistent entities.
Instances of the OrmTable are serializable, but you need to know that only
business data will be transferred, the session and property changes will not be passed.
The sample of use:
/** Using INSERT */ public void useCreateItem() { Order order = new Order(); order.set(Order.DATE, new Date()); order.set(Order.DESCR, "John's order"); Item item = new Item(); item.set(Item.ORDER, order); item.set(Item.DESCR, "Yellow table"); Session session = OrmHandler.getInstance().getSession(); session.save(order); session.save(item); session.commit(); }
RelationToMany,
UjoIterator,
Serialized Form| Constructor Summary | |
|---|---|
OrmTable()
|
|
| Method Summary | ||
|---|---|---|
|
get(UjoProperty<UJO,VALUE> property)
Getter based on UjoProperty implemeted by a pattern UjoExt |
|
protected static
|
newRelation(java.lang.Class<ITEM> type)
A PropertyIterator Factory creates an new property and assign a next index. |
|
protected static
|
newRelation(java.lang.String name,
java.lang.Class<ITEM> type)
A PropertyIterator Factory creates an new property and assign a next index. |
|
boolean |
readAuthorization(UjoAction action,
UjoProperty property,
java.lang.Object value)
Test an authorization of the action. |
|
|
readFK(UjoProperty<UJO,? extends OrmUjo> property)
Read the foreign key. |
|
UjoProperty[] |
readChangedProperties(boolean clear)
Returns a changed properties. |
|
Session |
readSession()
Read a session |
|
java.lang.Object |
readValue(UjoProperty property)
A method for an internal use only. |
|
|
set(UjoProperty<UJO,VALUE> property,
VALUE value)
Setter based on UjoProperty. |
|
void |
writeSession(Session session)
Write a session |
|
void |
writeValue(UjoProperty property,
java.lang.Object value)
A method for an internal use only. |
|
| Methods inherited from class org.ujoframework.implementation.quick.QuickUjo |
|---|
newListProperty, newListProperty, newProperty, newProperty, newProperty, newProperty, newProperty, newProperty |
| Methods inherited from class org.ujoframework.extensions.AbstractUjo |
|---|
clone, equals, init, init, readProperties, readUjoManager, readValueString, toString, writeValueString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ujoframework.Ujo |
|---|
readProperties |
| Constructor Detail |
|---|
public OrmTable()
| Method Detail |
|---|
public Session readSession()
readSession in interface OrmUjopublic void writeSession(Session session)
writeSession in interface OrmUjo
public void writeValue(UjoProperty property,
java.lang.Object value)
writeValue in interface UjowriteValue in class QuickUjoproperty - Property must be a direct type only!Property.setValue(Ujo,Object)public java.lang.Object readValue(UjoProperty property)
readValue in interface OrmUjoreadValue in interface UjoreadValue in class QuickUjoproperty - Property must be a direct type only!
Property.getValue(Ujo)public UjoProperty[] readChangedProperties(boolean clear)
readChangedProperties in interface OrmUjoclear - True value clears the property changes.public final <UJO extends UJO_IMPL,VALUE> VALUE get(UjoProperty<UJO,VALUE> property)
public final <UJO extends UJO_IMPL,VALUE> UJO_IMPL set(UjoProperty<UJO,VALUE> property,
VALUE value)
public boolean readAuthorization(UjoAction action,
UjoProperty property,
java.lang.Object value)
readAuthorization in interface UjoreadAuthorization in class AbstractUjoaction - Type of request. See constant(s) ACTION_* for more information.
The action must not be null, however there is allowed to use a dummy constant UjoAction.DUMMY .property - A property of the Ujovalue - A value
Action Constants
public <UJO extends UJO_IMPL> ForeignKey readFK(UjoProperty<UJO,? extends OrmUjo> property)
throws java.lang.IllegalStateException
readFK in interface ExtendedOrmUjo<UJO_IMPL extends Ujo>java.lang.IllegalStateException - Method throws an exception for a wrong property type.
java.lang.NullPointerException - Method throws an exception if a Session is missing after a lazy initialization of the property.
protected static <UJO extends OrmTable,ITEM extends OrmTable> RelationToMany<UJO,ITEM> newRelation(java.lang.String name,
java.lang.Class<ITEM> type)
protected static <UJO extends OrmTable,ITEM extends OrmTable> RelationToMany<UJO,ITEM> newRelation(java.lang.Class<ITEM> type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||