|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujorm.extensions.SuperAbstractUjo
org.ujorm.extensions.AbstractUjo
org.ujorm.implementation.quick.QuickUjo
org.ujorm.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(Key<UJO,VALUE> property)
Getter based on Key implemeted by a pattern UjoExt |
|
protected static
|
newCamelFactory(Class<? extends UJO> ujoClass)
Create a factory with a cammel-case Key name generator. |
|
protected static
|
newFactory(Class<? extends UJO> ujoClass)
Create a base factory with a cammel-case Key name generator. |
|
protected static
|
newKey()
A Property Factory creates new property and assigns a next property index. |
|
static
|
newKey(Key p)
Returns a new instance of property where the default value is null. |
|
protected static
|
newKey(String name)
A Property Factory creates new property and assigns a next property index. |
|
protected static
|
newKey(String name,
Class<VALUE> type,
VALUE defaultValue,
int index,
boolean lock)
A Property Factory creates new property and assigns a next property index. |
|
protected static
|
newKey(String name,
VALUE defaultValue)
A Property Factory creates new property and assigns a next property index. |
|
protected static
|
newKey(VALUE value)
A Property Factory creates new property and assigns a next property index. |
|
protected static
|
newKeyDefault(VALUE defaultValue)
A Property Factory creates new property and assigns a next property index. |
|
protected static
|
newProperty()
Deprecated. Use the method newKey(...) |
|
protected static
|
newProperty(Class<VALUE> type)
Deprecated. Use rather a method QuickUjo.newProperty() instead of this, |
|
protected static
|
newProperty(String name)
Deprecated. Use the method newKey(...) |
|
protected static
|
newProperty(String name,
Class<VALUE> type)
Deprecated. Use rather a method QuickUjo.newProperty(java.lang.String) instead of this. |
|
protected static
|
newProperty(String name,
Class<VALUE> type,
VALUE defaultValue,
int index,
boolean lock)
Deprecated. |
|
protected static
|
newProperty(String name,
VALUE value)
Deprecated. Use the method newKey(...) |
|
protected static
|
newProperty(VALUE value)
Deprecated. Use the method newKey(...) |
|
protected static
|
newRelation()
A PropertyIterator Factory creates an new property and assign a next index. |
|
protected static
|
newRelation(Class<ITEM> type)
Deprecated. use the newRelation() instead of this. |
|
protected static
|
newRelation(String name)
A PropertyIterator Factory creates an new property and assign a next index. |
|
protected static
|
newRelation(String name,
Class<ITEM> type)
Deprecated. use the newRelation(java.lang.String) instead of this. |
|
boolean |
readAuthorization(UjoAction action,
Key property,
Object value)
Test an authorization of the action. |
|
|
readFK(Key<UJO,? extends OrmUjo> property)
Read the foreign key. |
|
Key[] |
readChangedProperties(boolean clear)
Returns a changed keys. |
|
Session |
readSession()
Read a session |
|
|
set(Key<UJO,VALUE> property,
VALUE value)
Setter based on Key. |
|
void |
writeSession(Session session)
Write a session |
|
void |
writeValue(Key property,
Object value)
A method for an internal use only. |
|
| Methods inherited from class org.ujorm.implementation.quick.QuickUjo |
|---|
newListKey, newListKey, newListProperty, newListProperty, newListProperty, newListProperty |
| Methods inherited from class org.ujorm.extensions.AbstractUjo |
|---|
readValue |
| Methods inherited from class org.ujorm.extensions.SuperAbstractUjo |
|---|
clone, equals, init, init, readKeys, 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.ujorm.Ujo |
|---|
readKeys, readProperties, readValue |
| Constructor Detail |
|---|
public OrmTable()
| Method Detail |
|---|
public Session readSession()
readSession in interface OrmUjopublic void writeSession(Session session)
writeSession in interface OrmUjo
public void writeValue(Key property,
Object value)
writeValue in interface UjowriteValue in class AbstractUjopublic Key[] readChangedProperties(boolean clear)
readChangedProperties in interface OrmUjoclear - True value clears the property changes.
public final <UJO extends UJO_IMPL,VALUE> VALUE get(Key<UJO,VALUE> property)
public final <UJO extends UJO_IMPL,VALUE> UJO_IMPL set(Key<UJO,VALUE> property,
VALUE value)
public boolean readAuthorization(UjoAction action,
Key property,
Object value)
readAuthorization in interface UjoreadAuthorization in class SuperAbstractUjo
public <UJO extends UJO_IMPL> ForeignKey readFK(Key<UJO,? extends OrmUjo> property)
throws IllegalStateException
readFK in interface ExtendedOrmUjo<UJO_IMPL extends Ujo>property - Must be direct property only (Key.isDirect()==true)
IllegalStateException - Method throws an exception for a wrong property type.
NullPointerException - Method throws an exception if a Session is missing after a lazy initialization of the property.protected static <UJO extends Ujo> KeyFactory<UJO> newCamelFactory(Class<? extends UJO> ujoClass)
KeyFactory.close();
protected static <UJO extends Ujo> KeyFactory<UJO> newFactory(Class<? extends UJO> ujoClass)
KeyFactory.close();
@Deprecated
protected static <UJO extends ExtendedOrmUjo,ITEM extends ExtendedOrmUjo> RelationToMany<UJO,ITEM> newRelation(String name,
Class<ITEM> type)
newRelation(java.lang.String) instead of this.
protected static <UJO extends ExtendedOrmUjo,ITEM extends ExtendedOrmUjo> RelationToMany<UJO,ITEM> newRelation(String name)
@Deprecated protected static <UJO extends ExtendedOrmUjo,ITEM extends ExtendedOrmUjo> RelationToMany<UJO,ITEM> newRelation(Class<ITEM> type)
newRelation() instead of this.
protected static <UJO extends ExtendedOrmUjo,ITEM extends ExtendedOrmUjo> RelationToMany<UJO,ITEM> newRelation()
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newKey()
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newKey(String name)
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newKey(String name,
VALUE defaultValue)
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newKeyDefault(VALUE defaultValue)
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newKey(String name,
Class<VALUE> type,
VALUE defaultValue,
int index,
boolean lock)
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newKey(VALUE value)
public static <UJO extends QuickUjo,VALUE> Property<UJO,VALUE> newKey(Key p)
@Deprecated
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty(String name,
Class<VALUE> type)
QuickUjo.newProperty(java.lang.String) instead of this.
@Deprecated protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty(String name)
@Deprecated
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty(String name,
VALUE value)
@Deprecated protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty(Class<VALUE> type)
QuickUjo.newProperty() instead of this,
@Deprecated
protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty(String name,
Class<VALUE> type,
VALUE defaultValue,
int index,
boolean lock)
@Deprecated protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty(VALUE value)
@Deprecated protected static <UJO extends Ujo,VALUE> Property<UJO,VALUE> newProperty()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||