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 |
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, bEnable, 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.
|
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.
|
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, getInfo, getInfo, getName, getObject, getObject, getObject, getObject, getObject, getObject, getPosition, getSupportsPreCount, isClassSupported, 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, setLast, setName, setPosition, toString, update
public 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 OADataSourceClient(Package packagex)
public OADataSourceClient()
public RemoteClientInterface getRemoteClient()
public void setAssignIdOnCreate(boolean b)
OADataSource
setAssignIdOnCreate
in interface OADataSourceInterface
setAssignIdOnCreate
in class OADataSource
b
- if true, assign autonumber property when object is created, else assign when object is saved.public boolean getAssignIdOnCreate()
OADataSource
getAssignIdOnCreate
in interface OADataSourceInterface
getAssignIdOnCreate
in class OADataSource
public boolean isAvailable()
OADataSource
isAvailable
in interface OADataSourceInterface
isAvailable
in class OADataSource
public int getMaxLength(Class c, String propertyName)
OADataSource
getMaxLength
in interface OADataSourceInterface
getMaxLength
in class OADataSource
protected void verifyConnection()
public boolean isClassSupported(Class clazz, OAFilter filter)
OADataSource
isClassSupported
in interface OADataSourceInterface
isClassSupported
in class OADataSource
clazz
- classfilter
- used to query the datasourcepublic void insertWithoutReferences(OAObject obj)
OADataSource
Called directly by OAObject.saveWithoutReferences() to save a reference while saving another Object.
insertWithoutReferences
in interface OADataSourceInterface
insertWithoutReferences
in class OADataSource
OAObject.save()
public void insert(OAObject obj)
OADataSource
Called directly by OAObject.save()
insert
in interface OADataSourceInterface
insert
in class OADataSource
public void update(OAObject obj, String[] includeProperties, String[] excludeProperties)
OADataSource
Called directly by OAObject.save()
update
in interface OADataSourceInterface
update
in class OADataSource
public void save(OAObject obj)
OADataSource
If object is an OAObject, then update() or insert() will be called, else nothing is done.
save
in interface OADataSourceInterface
save
in class OADataSource
public void delete(OAObject obj)
OADataSource
delete
in interface OADataSourceInterface
delete
in class OADataSource
public int count(Class selectClass, String queryWhere, Object[] params, OAObject whereObject, String propertyFromWhereObject, String extraWhere, int max)
OADataSource
count
in interface OADataSourceInterface
count
in class OADataSource
selectClass
- Class to perform query onqueryWhere
- query using property paths based on Object structure.OASelect
public int countPassthru(Class selectClass, String queryWhere, int max)
OADataSource
countPassthru
in interface OADataSourceInterface
countPassthru
in class OADataSource
queryWhere
- query based on DataSource structure.OASelect
public boolean supportsStorage()
supportsStorage
in interface OADataSourceInterface
supportsStorage
in class OADataSource
public OADataSourceIterator select(Class selectClass, String queryWhere, Object[] params, String queryOrder, OAObject whereObject, String propertyFromWhereObject, String extraWhere, int max, OAFilter filter, boolean bDirty)
OADataSource
See OASelect for complete description on selects/queriess.
select
in interface OADataSourceInterface
select
in class OADataSource
selectClass
- 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).OASelect
public OADataSourceIterator selectPassthru(Class selectClass, String queryWhere, String queryOrder, int max, OAFilter filter, boolean bDirty)
OADataSource
selectPassthru
in interface OADataSourceInterface
selectPassthru
in class OADataSource
selectClass
- Class of object to create and returnqueryWhere
- query based on DataSource structure.OASelect
public Object execute(String command)
OADataSource
execute
in interface OADataSourceInterface
execute
in class OADataSource
command
- DataSource native command.public void assignId(OAObject obj)
OADataSource
assignId
in interface OADataSourceInterface
assignId
in class OADataSource
public boolean willCreatePropertyValue(OAObject object, String propertyName)
OADataSource
willCreatePropertyValue
in interface OADataSourceInterface
willCreatePropertyValue
in class OADataSource
public 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 OADataSourceInterface
updateMany2ManyLinks
in class OADataSource
public byte[] getPropertyBlobValue(OAObject obj, String propertyName)
OADataSource
getPropertyBlobValue
in interface OADataSourceInterface
getPropertyBlobValue
in class OADataSource
Copyright © 1999–2019 ViaOA. All rights reserved.