final class FQLHelperCache
extends java.lang.Object
FQLHelper objects mapped to a complex key which encompasses the DMO
implementation class, base where clause, Hibernate substitution types, restriction sorting,
foreign key information, and whether the query is a project query.
An FQLHelper instance is retrieved using the get(java.lang.Class<? extends com.goldencode.p2j.persist.DataModelObject>, com.goldencode.p2j.persist.FqlType[], boolean, java.lang.String, java.lang.String, java.lang.Class<? extends com.goldencode.p2j.persist.DataModelObject>) method; it is stored
in the cache using the put(java.lang.Class<? extends com.goldencode.p2j.persist.DataModelObject>, com.goldencode.p2j.persist.FqlType[], boolean, java.lang.String, java.lang.String, java.lang.Class<? extends com.goldencode.p2j.persist.DataModelObject>, com.goldencode.p2j.persist.FQLHelper) method.
| Modifier and Type | Class and Description |
|---|---|
private static class |
FQLHelperCache.Key
FQLHelper hashable lookup key. |
| Modifier and Type | Field and Description |
|---|---|
private Cache<FQLHelperCache.Key,FQLHelper> |
cache
Expiry cache of FQL helper objects
|
| Constructor and Description |
|---|
FQLHelperCache()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) FQLHelper |
get(java.lang.Class<? extends DataModelObject> dmoIface,
FqlType[] types,
boolean idOnly,
java.lang.String where,
java.lang.String sort,
java.lang.Class<? extends DataModelObject> joinIface)
Attempt to retrieve an
FQLHelper from the cache. |
(package private) void |
put(java.lang.Class<? extends DataModelObject> dmoIface,
FqlType[] types,
boolean idOnly,
java.lang.String where,
java.lang.String sort,
java.lang.Class<? extends DataModelObject> joinIface,
FQLHelper helper)
Store an
FQLHelper in the cache. |
private final Cache<FQLHelperCache.Key,FQLHelper> cache
FQLHelper get(java.lang.Class<? extends DataModelObject> dmoIface, FqlType[] types, boolean idOnly, java.lang.String where, java.lang.String sort, java.lang.Class<? extends DataModelObject> joinIface)
FQLHelper from the cache.dmoIface - DMO interface associated with the helper. May not be null.types - Hibernate types of query substitution parameters. May be an empty array, but may
not be null.idOnly - Indicates whether query is a projection query returning the primary key ID only.where - Where clause of a query. May be null.sort - Order by clause of a query. May be null.joinIface - Interface DMO associated within query by foreign key. May be null.FQLHelper instance or null if an existing
instance was not found in the cache.void put(java.lang.Class<? extends DataModelObject> dmoIface, FqlType[] types, boolean idOnly, java.lang.String where, java.lang.String sort, java.lang.Class<? extends DataModelObject> joinIface, FQLHelper helper)
FQLHelper in the cache.dmoIface - DMO interface associated with the helper. May not be null.types - Hibernate types of query substitution parameters. May be an empty array, but may
not be null.idOnly - Indicates whether query is a projection query returning the primary key ID only.where - Where clause of a query. May be null.sort - Order by clause of a query. May be null.joinIface - Interface DMO associated within query by foreign key. May be null.helper - FQLHelper instance to be cached.