public class OADataSourceClient extends OADataSource
For more information about this package, see documentation.
| Modifier and Type | Field and Description |
|---|---|
static int |
ASSIGN_ID
internal value to work with OAClient
|
static int |
COUNT
internal value to work with OAClient
|
static int |
COUNTPASSTHRU
internal value to work with OAClient
|
static int |
DELETE
internal value to work with OAClient
|
static int |
DELETE_ALL |
static int |
EXECUTE
internal value to work with OAClient
|
static int |
GET_ASSIGN_ID_ON_CREATE
internal value to work with OAClient
|
static int |
GET_PROPERTY |
static int |
INSERT
internal value to work with OAClient
|
static int |
INSERT_WO_REFERENCES |
static int |
IS_AVAILABLE
internal value to work with OAClient
|
static int |
IS_CLASS_SUPPORTED
internal value to work with OAClient
|
static int |
IT_HASNEXT
internal value to work with OAClient
|
static int |
IT_NEXT
internal value to work with OAClient
|
static int |
IT_REMOVE
internal value to work with OAClient
|
static int |
MAX_LENGTH
internal value to work with OAClient
|
static int |
SAVE
internal value to work with OAClient
|
static int |
SELECT
internal value to work with OAClient
|
static int |
SELECTPASSTHRU
internal value to work with OAClient
|
static int |
SUPPORTSSTORAGE
internal value to work with OAClient
|
static int |
UPDATE
internal value to work with OAClient
|
static int |
UPDATE_MANY2MANY_LINKS |
static int |
WILLCREATEPROPERTYVALUE
internal value to work with OAClient
|
bAssignNumberOnCreate, bEnabled, bLast, dataSourceChangeCnter, guid, name| Constructor and Description |
|---|
OADataSourceClient() |
OADataSourceClient(Package packagex)
Create new OADataSourceClient that uses OAClient to communicate with OADataSource on OAServer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignId(OAObject obj)
Called by OAObject to initialize a new Object.
|
int |
count(Class selectClass,
String queryWhere,
Object[] params,
OAObject whereObject,
String propertyFromWhereObject,
String extraWhere,
int max)
Perform a count on the DataSource using a query.
|
int |
countPassthru(Class selectClass,
String queryWhere,
int max)
Performs a count using native query language for DataSource.
|
void |
delete(OAObject obj)
Remove an Object from a DataSource.
|
void |
deleteAll(Class c) |
Object |
execute(String command)
Execute a command on the dataSource.
|
boolean |
getAssignIdOnCreate()
Used to know if autonumber properties should be assigned on create or on save.
|
int |
getMaxLength(Class c,
String propertyName)
Returns max length allowed for a property.
|
byte[] |
getPropertyBlobValue(OAObject obj,
String propertyName)
Select BLOB (large byte[]) property
|
RemoteClientInterface |
getRemoteClient() |
void |
insert(OAObject obj)
Add/Insert a new Object into DataSource.
|
void |
insertWithoutReferences(OAObject obj)
Add/Insert a new Object into DataSource, without references (fkeys).
|
boolean |
isAvailable()
Used to know is datasoure is currently available.
|
boolean |
isClassSupported(Class clazz,
OAFilter filter)
Used by static OADataSource to know if a registered OADataSource subclass supports a specific Class.
|
boolean |
isClient()
Is this a client computer that needs to remotely connect to datasource on a server.
|
void |
save(OAObject obj)
Used to save an object to DataSource.
|
OADataSourceIterator |
select(Class selectClass,
String queryWhere,
Object[] params,
String queryOrder,
OAObject whereObject,
String propertyFromWhereObject,
String extraWhere,
int max,
OAFilter filter,
boolean bDirty)
Perform a query to retrieve objects from DataSource.
|
OADataSourceIterator |
selectPassthru(Class selectClass,
String queryWhere,
String queryOrder,
int max,
OAFilter filter,
boolean bDirty)
Performs a select using native query language for DataSource.
|
void |
setAssignIdOnCreate(boolean b)
Used to know if autonumber properties should be assigned on create or on save.
|
void |
setMaxLength(Class c,
String propertyName,
int length) |
boolean |
supportsStorage()
does this dataSource support selecting/storing/deleting
|
void |
update(OAObject obj,
String[] includeProperties,
String[] excludeProperties)
Update an existing Object to DataSource.
|
void |
updateMany2ManyLinks(OAObject masterObject,
OAObject[] adds,
OAObject[] removes,
String propertyNameFromMaster)
Used by dataSources to update special requirements for handling Many2Many relationships (ex:Link Table).
|
protected void |
verifyConnection() |
boolean |
willCreatePropertyValue(OAObject object,
String propertyName)
Returns true if the dataSource will set the property value before saving.
|
close, closeAll, count, count, count, count, count, count, count, count, count, count, countPassthru, countPassthru, finalize, getAllowIdChange, getChangeCounter, getDataSource, getDataSource, getDataSources, getEnabled, getGuid, getIgnoreWrites, getInfo, getInfo, getName, getObject, getObject, getObject, getObject, getObject, getObject, getPosition, getReadOnly, getSupportsPreCount, isAllowingBatch, isClassSupported, isInTransaction, removeFromList, reopen, select, select, select, select, select, select, select, select, select, select, select, select, select, select, select, select, select, select, selectPassthru, selectPassthru, selectPassthru, selectPassthru, selectPassthru, setEnabled, setGuid, setIgnoreWrites, setLast, setName, setPosition, setReadOnly, toString, updateclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitbackup, checkForCorruption, compress, restorepublic static final int IS_AVAILABLE
public static final int MAX_LENGTH
public static final int IS_CLASS_SUPPORTED
public static final int INSERT_WO_REFERENCES
public static final int UPDATE_MANY2MANY_LINKS
public static final int INSERT
public static final int UPDATE
public static final int DELETE
public static final int SAVE
public static final int COUNT
public static final int COUNTPASSTHRU
public static final int SUPPORTSSTORAGE
public static final int EXECUTE
public static final int WILLCREATEPROPERTYVALUE
public static final int IT_HASNEXT
public static final int IT_NEXT
public static final int IT_REMOVE
public static final int SELECT
public static final int SELECTPASSTHRU
public static final int GET_ASSIGN_ID_ON_CREATE
public static final int ASSIGN_ID
public static final int GET_PROPERTY
public static final int DELETE_ALL
public OADataSourceClient(Package packagex)
public OADataSourceClient()
public RemoteClientInterface getRemoteClient()
public void setAssignIdOnCreate(boolean b)
OADataSourcesetAssignIdOnCreate in interface OADataSourceInterfacesetAssignIdOnCreate in class OADataSourceb - if true, assign autonumber property when object is created, else assign when object is saved.public boolean getAssignIdOnCreate()
OADataSourcegetAssignIdOnCreate in interface OADataSourceInterfacegetAssignIdOnCreate in class OADataSourcepublic boolean isAvailable()
OADataSourceisAvailable in interface OADataSourceInterfaceisAvailable in class OADataSourcepublic int getMaxLength(Class c, String propertyName)
OADataSourcegetMaxLength in interface OADataSourceInterfacegetMaxLength in class OADataSourceprotected void verifyConnection()
public boolean isClassSupported(Class clazz, OAFilter filter)
OADataSourceisClassSupported in interface OADataSourceInterfaceisClassSupported in class OADataSourceclazz - classfilter - used to query the datasourcepublic void insertWithoutReferences(OAObject obj)
OADataSourceCalled directly by OAObject.saveWithoutReferences() to save a reference while saving another Object.
insertWithoutReferences in interface OADataSourceInterfaceinsertWithoutReferences in class OADataSourceOAObject.save()public void insert(OAObject obj)
OADataSourceCalled directly by OAObject.save()
insert in interface OADataSourceInterfaceinsert in class OADataSourcepublic void update(OAObject obj, String[] includeProperties, String[] excludeProperties)
OADataSourceCalled directly by OAObject.save()
update in interface OADataSourceInterfaceupdate in class OADataSourcepublic void save(OAObject obj)
OADataSourceIf object is an OAObject, then update() or insert() will be called, else nothing is done.
save in interface OADataSourceInterfacesave in class OADataSourcepublic void delete(OAObject obj)
OADataSourcedelete in interface OADataSourceInterfacedelete in class OADataSourcepublic void deleteAll(Class c)
deleteAll in interface OADataSourceInterfacedeleteAll in class OADataSourcepublic int count(Class selectClass, String queryWhere, Object[] params, OAObject whereObject, String propertyFromWhereObject, String extraWhere, int max)
OADataSourcecount in interface OADataSourceInterfacecount in class OADataSourceselectClass - Class to perform query onqueryWhere - query using property paths based on Object structure.OASelectpublic int countPassthru(Class selectClass, String queryWhere, int max)
OADataSourcecountPassthru in interface OADataSourceInterfacecountPassthru in class OADataSourcequeryWhere - query based on DataSource structure.OASelectpublic boolean supportsStorage()
supportsStorage in interface OADataSourceInterfacesupportsStorage in class OADataSourcepublic OADataSourceIterator select(Class selectClass, String queryWhere, Object[] params, String queryOrder, OAObject whereObject, String propertyFromWhereObject, String extraWhere, int max, OAFilter filter, boolean bDirty)
OADataSourceSee OASelect for complete description on selects/queriess.
select in interface OADataSourceInterfaceselect in class OADataSourceselectClass - Class of object to create and returnqueryWhere - query String using property paths based on Object structure. DataSourceparams - list of values to replace '?' in queryWhere clause.queryOrder - sort orderwhereObject - master object to select from.extraWhere - added to the query.filter - the datasource filter, used if the ds does not support queries (ex: sql) will convert query to native query
language of the datasoure.bDirty - true if objects should be fully populated, even if they are already loaded (in cache, etc).OASelectpublic OADataSourceIterator selectPassthru(Class selectClass, String queryWhere, String queryOrder, int max, OAFilter filter, boolean bDirty)
OADataSourceselectPassthru in interface OADataSourceInterfaceselectPassthru in class OADataSourceselectClass - Class of object to create and returnqueryWhere - query based on DataSource structure.OASelectpublic Object execute(String command)
OADataSourceexecute in interface OADataSourceInterfaceexecute in class OADataSourcecommand - DataSource native command.public void assignId(OAObject obj)
OADataSourceassignId in interface OADataSourceInterfaceassignId in class OADataSourcepublic boolean willCreatePropertyValue(OAObject object, String propertyName)
OADataSourcewillCreatePropertyValue in interface OADataSourceInterfacewillCreatePropertyValue in class OADataSourcepublic void updateMany2ManyLinks(OAObject masterObject, OAObject[] adds, OAObject[] removes, String propertyNameFromMaster)
OADataSource
Uses the hub.masterObject, Hub.getRemovedObjects(), Hub.getAddedObjects() to find out which objects were added or removed.
This is called by OAObject.cascadeSave/Delete methods
updateMany2ManyLinks in interface OADataSourceInterfaceupdateMany2ManyLinks in class OADataSourcepublic byte[] getPropertyBlobValue(OAObject obj, String propertyName)
OADataSourcegetPropertyBlobValue in interface OADataSourceInterfacegetPropertyBlobValue in class OADataSourcepublic boolean isClient()
OADataSourceInterfaceCopyright © 1999–2025 ViaOA. All rights reserved.