/** * Test if the object is a valid state object (oid). * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObject(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return containsObject(id); }
/** * Test if reading the object (oid) is allowed. * Reading is allowed on removed objects as long as there are external references. * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObjectRead(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return checkValidStateObject(id) || isExternallyUsed(id); }
/** * Test if the object is a valid state value, meaning * that is either a state object or a java value. * @param value The value. * @return True, if valid. */ protected boolean checkValidStateValue(Object value) { // No state object (i.e. Java object) or object in state. return !generator.isId(value) || checkValidStateObject(value); }
/** * Create an id generator. * @return The id generator. */ public IOAVIdGenerator createIdGenerator() { return new OAVDebugIdGenerator(); // return new OAVNameIdGenerator(); // return new OAVLongIdGenerator(); // return new OAVObjectIdGenerator(); }
/** * Create a new OAV state for the given type model. */ public static IOAVState createOAVState(OAVTypeModel model) { // return new OAVState(model); // return new OAVMixedWeakState(model); return new OAVContentIdState(model); } }
/** * Create an object. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createObject(OAVObjectType type) { return createObject(type, false); }
/** * Get the object content of an object. * @param id The id. * @return The content map of the object. */ protected Map internalGetObjectContent(Object id) { return ((IOAVContentId)id).getContent(); }
/** * Create a string representation of this OAV object id. */ public String toString() { return "extid_"+id.toString(); }
/** * Return the hashcode for this id. * @return The hashcode for this id. */ public int hashCode() { return id.hashCode(); } }
/** * Test if the object represents an identifier. * @param object The suspected object identifier. * @return True, if object identifier. */ public boolean isIdentifier(Object object) { return generator.isId(object); }
/** * Throw collected events and notify the listeners. */ public void notifyEventListeners() { eventhandler.notifyEventListeners(); }
/** * Get all objects in the state. */ public Iterator getDeepObjects() { return getObjects(); }
/** * Test if reading the object (oid) is allowed. * Reading is allowed on removed objects as long as there are external references. * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObjectRead(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return checkValidStateObject(id) || isExternallyUsed(id); }
/** * Test if the object is a valid state object (oid). * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObject(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return containsObject(id); }
/** * Test if the object is a valid state value, meaning * that is either a state object or a java value. * @param value The value. * @return True, if valid. */ protected boolean checkValidStateValue(Object value) { // No state object (i.e. Java object) or object in state. return !generator.isId(value) || checkValidStateObject(value); }
/** * Create an id generator. * @return The id generator. */ public IOAVIdGenerator createIdGenerator() { // return new OAVLongIdGenerator(true); // return new OAVNameIdGenerator(true); return new OAVDebugIdGenerator(true); // return new OAVObjectIdGenerator(true); }
/** * Create a new OAV state for the given type model. */ public static IOAVState createOAVState(OAVTypeModel model) { // return new OAVState(model); // return new OAVMixedWeakState(model); return new OAVContentIdState(model); } }
/** * Create an object. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createObject(OAVObjectType type) { return createObject(type, false); }
/** * Create an id generator. * @return The id generator. */ public IOAVIdGenerator createIdGenerator() { return new OAVDebugIdGenerator(); // return new OAVNameIdGenerator(); // return new OAVLongIdGenerator(); // return new OAVObjectIdGenerator(); }
/** * Create an id generator. * @return The id generator. */ public IOAVIdGenerator createIdGenerator() { // return new OAVLongIdGenerator(true); // return new OAVNameIdGenerator(true); return new OAVDebugIdGenerator(true); // return new OAVObjectIdGenerator(true); }