/** * 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); }
/** * Add an external usage of a state object (oid). This prevents * the oav object of being garbage collected as long * as external references are present. * @param id The oav object id. * @param external The user object. */ public void addExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * 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); }
/** * 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); }
/** * 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); }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * 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 true; // Hack!!! Needed, because isExternallyUsed always returns false. } }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * 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 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) || weakobjects.containsKey(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); }
/** * 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); }
/** * Test if two values are equal * according to current identity/equality * settings. */ public boolean equals(Object a, Object b) { // When a!=b && javaidentity use equals() only for ids or java values. return a==b || a!=null && (javaidentity ? ((generator.isId(a) || tmodel.getJavaType(a.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)) && a.equals(b)) : a.equals(b)); }
/** * Test if two values are equal * according to current identity/equality * settings. */ public boolean equals(Object a, Object b) { // When a!=b && javaidentity use equals() only for ids or java values. return a==b || a!=null && (javaidentity ? ((generator.isId(a) || tmodel.getJavaType(a.getClass()).getKind().equals(OAVJavaType.KIND_VALUE)) && a.equals(b)) : a.equals(b)); }
/** * 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 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); }
/** * Check if a value (oid or java object) is managed by the state. * Returns true for attribute values which are directly contained oav objects * or mutable java objects, e.g. not simple values such as strings or intergers. */ protected boolean isManaged(Object value) { // Value is a directly contained object or java bean/object (i.e. not basic value) return value!=null && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE) && (!generator.isId(value) || internalContainsObject(value)); // return value!=null && // (!generator.isId(value) && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE) // || internalContainsObject(value)); }
/** * Check if a value (oid or java object) is managed by the state. * Returns true for attribute values which are directly contained oav objects * or mutable java objects, e.g. not simple values such as strings or intergers. */ protected boolean isManaged(Object value) { // Value is a directly contained object or java bean/object (i.e. not basic value) return value!=null && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE) && (!generator.isId(value) || internalContainsObject(value)); // return value!=null && // (!generator.isId(value) && !tmodel.getJavaType(value.getClass()).getKind().equals(OAVJavaType.KIND_VALUE) // || internalContainsObject(value)); }