public class OAObjectDelegate extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
bFinalizeSave
Flag to know if finalized objects should be automatically saved.
|
static Boolean |
FALSE |
protected static AtomicInteger |
guidCounter
global counter used for local objects.
|
protected static AtomicInteger |
localGuidCounter
global counter used for local objects.
|
static Boolean |
TRUE |
static String |
WORD_AutoAdd |
static String |
WORD_Changed |
static String |
WORD_Deleted |
static String |
WORD_New |
Constructor and Description |
---|
OAObjectDelegate() |
Modifier and Type | Method and Description |
---|---|
protected static void |
assignGuid(OAObject obj) |
protected static void |
dontFinalize(OAObject obj)
Used when there is a duplicate object created, so that it will not be finalized
Called by OAObjectCacheDelegate.add(OAObject, ...) when an object already exists.
|
static void |
finalizeObject(OAObject oaObj)
Removes object from HubController and calls super.finalize().
|
protected static Object[] |
find(OAObject base,
String propertyPath,
Object findValue,
boolean bFindAll) |
static boolean |
getAutoAdd(OAObject oaObj) |
static boolean |
getChanged(OAObject oaObj,
int changedRule)
Returns true if this object is new or any changes have been made to this object or
any objects in Links that are TYPE=MANY and CASCADE=true that match the relationshipType parameter.
|
static boolean |
getChanged(OAObject oaObj,
int iCascadeRule,
OACascade cascade) |
static int |
getGuid(OAObject obj) |
static int |
getNextFiftyGuids() |
static int |
getNextGuid()
Gets the next GUID for the current computer.
|
protected static void |
initialize(OAObject oaObj)
Called by OAObject constructor to assign guid and initialize new OAObject.
|
protected static void |
initialize(OAObject oaObj,
OAObjectInfo oi,
boolean bInitializeNulls,
boolean bInitializeWithDS,
boolean bAddToCache,
boolean bInitializeWithCS,
boolean bSetChangedToFalse) |
static void |
reassignGuid(OAObject obj,
OAObjectKey origKey)
This is used by RemoteSyncImpl on the server, when it has to reload a GCd object from DS.
|
static void |
recurse(OAObject oaObj,
OACallback callback)
Used to recursively get all reference objects below this one.
|
static void |
recurse(OAObject oaObj,
OACallback callback,
OACascade cascade)
see #recurse(OACallback)
|
protected static void |
rehash(OAObject oaObj,
OAObjectKey oldKey)
Central method that is used when the object property Key is changed (OAObjectKey)
and needs to be rehashed in all Hashtables that it could exist in.
|
static void |
setAsNewObject(OAObject oaObj) |
static void |
setAsNewObject(OAObject oaObj,
int guid) |
static void |
setAutoAdd(OAObject oaObj,
boolean bEnabled)
Used to determine if an object should be added to a reference/master hub when one
of it's OAObject properties is set.
|
static void |
setNew(OAObject oaObj,
boolean b)
Flag to know if object is new and has not been saved.
|
static void |
setNextGuid(int x) |
protected static void |
updateGuid(int guid)
Used when "reading" serialized objects.
|
public static final String WORD_New
public static final String WORD_Changed
public static final String WORD_Deleted
public static final String WORD_AutoAdd
public static final Boolean TRUE
public static final Boolean FALSE
protected static AtomicInteger guidCounter
protected static AtomicInteger localGuidCounter
protected static boolean bFinalizeSave
protected static void initialize(OAObject oaObj)
protected static void initialize(OAObject oaObj, OAObjectInfo oi, boolean bInitializeNulls, boolean bInitializeWithDS, boolean bAddToCache, boolean bInitializeWithCS, boolean bSetChangedToFalse)
oaObj
- oi
- if null, then the correct oi will be retrieved.bInitializeNulls
- set all primitive properties to nullbInitializeWithDS
- will call OAObjectDSDelegateinitialize()bAddToCache
- if true then call OAObjectCacheDelegate.add()bInitializeWithCS
- if true, then call OAObjectCSDelegate.initialize().public static void setNew(OAObject oaObj, boolean b)
protected static void assignGuid(OAObject obj)
public static void setAsNewObject(OAObject oaObj)
public static void setAsNewObject(OAObject oaObj, int guid)
public static void reassignGuid(OAObject obj, OAObjectKey origKey)
obj
- newly loaded object from DSorigKey
- public static int getNextGuid()
public static int getNextFiftyGuids()
public static void setNextGuid(int x)
protected static void dontFinalize(OAObject obj)
protected static void updateGuid(int guid)
public static void finalizeObject(OAObject oaObj)
public static boolean getChanged(OAObject oaObj, int changedRule)
public static void recurse(OAObject oaObj, OACallback callback)
public static void recurse(OAObject oaObj, OACallback callback, OACascade cascade)
protected static Object[] find(OAObject base, String propertyPath, Object findValue, boolean bFindAll)
protected static void rehash(OAObject oaObj, OAObjectKey oldKey)
oaObj
- oldKey
- public static int getGuid(OAObject obj)
public static void setAutoAdd(OAObject oaObj, boolean bEnabled)
oaObj
- bEnabled
- (default is true)public static boolean getAutoAdd(OAObject oaObj)
Copyright © 1999–2019 ViaOA. All rights reserved.