|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.root.db.DefaultRepositoryClient
org.norther.tammi.root.db.DefaultMultiRepositoryClient
org.norther.tammi.root.db.DefaultBeanRepositoryClient
public class DefaultBeanRepositoryClient
A default implementation of BeanRepositoryClient.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.root.db.DefaultRepositoryClient |
|---|
AUTHENTICATED_SIGNATURE, DEFAULT_PERSISTER, KEY_SIGNATURE |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.root.db.BeanRepositoryClient |
|---|
NULL_PK, ROOT_PK |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultBeanRepositoryClient()
Constructs a new repository client. |
|
| Method Summary | |
|---|---|
boolean |
add1NForeignReferences(Object node,
String className,
String fkField,
Object[] fks,
Persister persister)
Adds foreign references to 1:n relations in a tree. |
boolean |
add1NNullReferences(String className,
String fkField,
Object[] fks,
Persister persister)
Adds null references to 1:n relations in a tree. |
boolean |
add1NObjectReferences(Object node,
String relField,
String fkField,
Object[] fks,
Persister persister)
Adds object references to 1:n relations in a tree formed by nodes of the same class. |
boolean |
addAttributeValues(Object node,
String field,
Persister persister,
List result)
Adds nested attribute values in a tree to a list. |
boolean |
addTo1NRelationMap(Object node,
String fkField,
DBCriteria criteria,
Persister persister,
ConcurrentMap map)
Adds referenced objects fulfilling the specified criteria in a 1:n tree to a map. |
boolean |
addTo1NRelationMap(Object node,
String relField,
String fkField,
DBCriteria criteria,
Persister persister,
ConcurrentMap map)
Adds referenced objects fulfilling the specified criteria in a 1:n tree to a map. |
boolean |
addToAttributeChain(Object node,
String relField,
String valueField,
Persister persister,
List list)
Adds attribute values of a chain of referenced objects in a tree into a list, the attribute of the end object at the lowest index. |
boolean |
addToAttributeMap(Object node,
String relField,
String valueField,
Persister persister,
ConcurrentMap map)
Adds attribute values of referenced nodes in a tree into a map. |
boolean |
addToIdentityList(Collection vars,
int index,
String[] nameFields,
Persister persister,
OrderedSet list)
Adds a collection of variables as enumerated identities to an ordered set. |
boolean |
addToIdentityList(Variable var,
int index,
String[] nameFields,
Persister persister,
OrderedSet list)
Adds the specified variable as an enumerated identity to an ordered set. |
boolean |
addToIdentityTree(Collection roots,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Adds a collection of root variables to an ordered map. |
boolean |
addToIdentityTree(Collection vars,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Adds the variable chains of the selected variables to an ordered map. |
boolean |
addToIdentityTree(Identity[] ids,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Adds the variable chains of the selected identities to an ordered map. |
boolean |
addToIdentityTree(Identity id,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Adds the variable chain of the selected identity to an ordered map. |
boolean |
addToIdentityTree(Variable root,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Adds the specified root variable to an ordered map. |
boolean |
addToIdentityTree(Variable var,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Adds the variable chain of the selected variable to an ordered map. |
boolean |
addToMNRelationMap(Object node,
String indirection,
String fkField1,
String fkField2,
DBCriteria criteria,
Persister persister,
ConcurrentMap map)
Adds referenced objects fulfilling the specified criteria in a m:n tree to a map. |
boolean |
addToMNRelationMap(Object node,
String relField,
String indirection,
String fkField1,
String fkField2,
DBCriteria criteria,
Persister persister,
ConcurrentMap map)
Adds referenced objects fulfilling the specified criteria in a m:n tree to a map. |
boolean |
addToRelationChain(Object node,
String relField,
Persister persister,
List list)
Adds a chain of referenced objects in a tree to a list, the end variable at the lowest index. |
boolean |
addToRelationMap(Object node,
String relField,
Persister persister,
ConcurrentMap map)
Adds referenced objects in a tree to a map. |
boolean |
addToVariableChain(Variable var,
String relField,
Collection filter,
Persister persister,
List list)
Adds a chain of referenced variables in a tree to a list, the end variable at the lowest index. |
void |
collapseInIdentityTree(Identity id,
Persister persister,
OrderedMap tree)
Collapses the specified identity in the ordered map representing an identity tree. |
Introspector |
createIntrospector()
Creates a variable introspector. |
Variable |
createVariable(Class clazz)
Creates a new variable instance of the specified class. |
Variable |
createVariable(String type)
Creates a new variable MBean instance of the specified type. |
void |
delete1NRelationTree(Object node,
String relField,
List predeps,
List postdeps,
Persister persister)
Deletes the specified object and its subtree from a tree in 1:n relations. |
void |
deleteMNRelationTree(Object node,
String relField,
String indirection,
String fkField1,
String fkField2,
List predeps,
List postdeps,
Persister persister)
Deletes the specified object and its subtree from a tree in m:n relations. |
void |
deleteObject(Object node,
List predeps,
List postdeps,
Persister persister)
Deletes the specified object and its dependencies. |
void |
expandInIdentityTree(Identity id,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Expands the specified identity in the ordered map representing an identity tree. |
VariableAttributeInfo |
getAttributeInfo(Variable node,
String field,
Persister persister)
Gets a nested attribute info in a tree. |
Object |
getAttributeValue(Object node,
String field,
Persister persister)
Gets a nested attribute value in a tree. |
List |
getAttributeValues(Object node,
String field,
Persister persister)
Gets a list of nested attribute values in a tree. |
Object |
getEndReference(Object node,
String relField,
Persister persister)
Gets the end node in a tree. |
Object |
getKeyAttributeValue(Object node,
Persister persister)
Gets the primary key attribute value. |
Object[] |
getKeyAttributeValues(Object node,
Persister persister)
Gets an array of primary key attribute values. |
Object |
getNextReference(Object node,
int index,
String relField,
Persister persister)
Gets the indexed node in a tree. |
Object |
getNextReference(Object node,
String relField,
Persister persister)
Gets the next referenced node in a tree. |
List |
getNextReferences(Object node,
String relField,
Persister persister)
Gets a list of referenced nodes in a tree. |
int |
getReferenceDepth(Object node,
String relField,
Persister persister)
Gets the depth of a node in a tree. |
protected ResourceMap |
getResourceMap()
Gets the referent of the resource map MBean. |
Object |
getRootReference(Object node,
String relField,
Persister persister)
Gets the root node in a tree. |
List |
getRootReferences(Object node,
String relField,
Persister persister)
Gets a list of root nodes in a tree. |
protected VariableRegistry |
getVariableRegistry()
Gets the referent of the variable registry MBean. |
ObjectName |
getVariableRegistryName()
Gets the the variable registry to be applied by contexts of this filter. |
boolean |
isLocalizedBeans()
Gets the localized beans flag. |
boolean |
isNullPK(Object pk)
Checks whether the specified pk is a null key. |
boolean |
isRelatedTo(Object node,
String relField,
Object xpk,
Persister persister)
Checks whether the specified key is related to the specified node. |
boolean |
isRootPK(Object pk)
Checks whether the specified pk is a root key. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
Collection |
queryAllObjects(String className,
DBCriteria criteria,
String[] sortFields,
Persister persister)
Queries all objects fulfilling the specified criteria, and may sort them by optional sort fields. |
Collection |
queryTreeObjects(String className,
Object pk,
String relField,
DBCriteria criteria,
String[] sortFields,
Persister persister)
Queries objects on the next level in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
boolean |
restoreIdentityTree(List enums,
int depth,
String parentField,
String childField,
String[] nameFields,
Persister persister,
OrderedMap tree)
Restores the specified enumerated identities to an ordered map. |
void |
setAttributeValue(Object node,
String field,
Object value,
boolean forced,
Persister persister)
Sets a nested attribute value in a tree with a forced option. |
void |
setAttributeValue(Object node,
String field,
Object value,
Persister persister)
Sets a nested attribute value in a tree. |
void |
setKeyAttributeValue(Object node,
Object value,
Persister persister)
Sets the primary key attribute value. |
void |
setKeyAttributeValues(Object node,
Object[] values,
Persister persister)
Sets an array of primary key attribute values. |
void |
setLocalizedBeans(boolean flag)
Sets the localized beans flag. |
Object[] |
setMNForeignReferences(Object node,
String indirection,
String fkField1,
String fkField2,
Object[] fks,
Persister persister)
Sets foreign references in m:n relations in a tree. |
Object[] |
setMNObjectReferences(Object node,
String relField,
String indirection,
String fkField1,
String fkField2,
Object[] fks,
Persister persister)
Sets object references in m:n relations in a tree formed by nodes of the same class. |
void |
setVariableRegistryName(ObjectName registry)
Sets the variable registry to be applied by contexts this filter. |
Collection |
sortObjects(Collection objects,
String[] sortFields,
Persister persister)
Sorts a collection of objects with the specified fields. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultBeanRepositoryClient()
| Method Detail |
|---|
public void postmanaged()
Manageable
postmanaged in interface Manageablepostmanaged in class Adaptee
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public boolean isNullPK(Object pk)
BeanRepositoryClient
isNullPK in interface BeanRepositoryClientpk - the pk to check.
public boolean isRootPK(Object pk)
BeanRepositoryClient
isRootPK in interface BeanRepositoryClientpk - the pk to check.
public Introspector createIntrospector()
BeanRepositoryClient
createIntrospector in interface BeanRepositoryClientpublic boolean isLocalizedBeans()
BeanRepositoryClient
isLocalizedBeans in interface BeanRepositoryClientpublic void setLocalizedBeans(boolean flag)
BeanRepositoryClient
setLocalizedBeans in interface BeanRepositoryClientflag - the localized beans flag.public ObjectName getVariableRegistryName()
BeanRepositoryClient
getVariableRegistryName in interface BeanRepositoryClientpublic void setVariableRegistryName(ObjectName registry)
BeanRepositoryClient
setVariableRegistryName in interface BeanRepositoryClientregistry - the object name of the variable registry or a query.
public Variable createVariable(String type)
throws ConstructionException
BeanRepositoryClient
createVariable in interface BeanRepositoryClienttype - the type of the variable.
ConstructionException - if construction fails.
public Variable createVariable(Class clazz)
throws ConstructionException
BeanRepositoryClient
createVariable in interface BeanRepositoryClientclazz - the class of the variable.
ConstructionException - if construction fails.
public Object getKeyAttributeValue(Object node,
Persister persister)
throws AttributeNotFoundException
BeanRepositoryClient
getKeyAttributeValue in interface BeanRepositoryClientnode - the node object.persister - the persister.
AttributeNotFoundException - for a missing field.
public void setKeyAttributeValue(Object node,
Object value,
Persister persister)
throws AttributeNotFoundException,
InvalidAttributeValueException
BeanRepositoryClient
setKeyAttributeValue in interface BeanRepositoryClientnode - the node object.value - the primary key attribute value.persister - the persister.
AttributeNotFoundException - for a missing field.
InvalidAttributeValueException - if the value is invalid.
public Object[] getKeyAttributeValues(Object node,
Persister persister)
throws AttributeNotFoundException
BeanRepositoryClient
getKeyAttributeValues in interface BeanRepositoryClientnode - the node object.persister - the persister.
AttributeNotFoundException - for a missing field.
public void setKeyAttributeValues(Object node,
Object[] values,
Persister persister)
throws InvalidAttributeValueException,
AttributeNotFoundException
BeanRepositoryClient
setKeyAttributeValues in interface BeanRepositoryClientnode - the node object.values - an array of primary key values.persister - the persister.
InvalidAttributeValueException - if the value is invalid.
AttributeNotFoundException - for a missing field.
public VariableAttributeInfo getAttributeInfo(Variable node,
String field,
Persister persister)
throws AttributeNotFoundException
BeanRepositoryClient
getAttributeInfo in interface BeanRepositoryClientnode - the node variable.field - the attribute field(s).persister - the persister.
AttributeNotFoundException - for a missing field.
public Object getAttributeValue(Object node,
String field,
Persister persister)
throws AttributeNotFoundException
BeanRepositoryClient
getAttributeValue in interface BeanRepositoryClientnode - the node object.field - the attribute field(s).persister - the persister.
AttributeNotFoundException - for a missing field.
public void setAttributeValue(Object node,
String field,