public interface DataSource
Modifier and Type | Method and Description |
---|---|
DBObject |
create(DBClass dbClass)
Creates a new DBObject of a particular type
|
DBObject |
create(GlobalId classGid)
Creates a new DBObject of a particular type
|
DBObject |
create(java.lang.String className)
Create a new Object of type passed.
|
DBClass |
findDBClass(GlobalId classId)
Find the object definition
|
DBClass |
findDBClass(java.lang.String className)
Finds the Definition of a Object.
|
DBClassAbstract |
findDBClassAbstract(GlobalId classId)
Find the object definition
|
DBClassAbstract |
findDBClassAbstract(java.lang.String className)
Finds the Definition of a Object.
|
DBObject |
findKey(GlobalId valueId,
GlobalId classId)
Find an object by it's key
|
DBObject |
findKey(GlobalId id,
java.lang.String defName)
Finds a new DBObject by its primary integer key
|
DBObject |
findKey(GlobalKey gKey)
Finds a new DBObject by its primary key
|
DBObject |
findKey(java.lang.String value,
java.lang.String defName)
Finds a unique DBObject based on supplied key value
|
DBObject |
findRow(long rowId,
DBClassConcrete def,
Hint hint)
Finds a DBObject by it's rowId with a hint of what's next
|
java.lang.Object |
getAttribute(java.lang.String name)
Gets a general purpose attribute.
|
java.lang.Object |
getCacheObject(java.lang.String key)
Get an object from the data source's cache
|
DataSource |
getCurrentDataSource()
get the current data source, if from VurtualDB then the thread local version
|
VirtualDB |
getDataBase()
Get the base virtual DB.
|
DataSource |
getDataBaseReadOnly()
Get the base virtual DB, if the data source is ReadOnlyDataSource.
|
Globals |
getGlobalObject()
Get the globals object
|
DBResult |
getInwardLinkage(DBClass sourceClass,
DBField sourceField,
DBObject target,
HintField hint)
Get the cached DBResult set for the linkage passed
|
Login |
getLogin()
Get the current login
|
DBQueryHandler |
getQueryHandler(DBClass searchClass)
makes a Query handler for simple virtual db.
|
Login |
getRealLogin()
Get the current "real" login
|
Session |
getSession()
Get the current session
|
java.util.TimeZone |
getTimeZone()
Get the timeZone used for date/time processing.
|
Person |
getUser()
Get the current user
|
boolean |
hasChild(DBClass mapClass,
DBField parentField,
DBObject parentObject,
DBField childField,
DBObject childObject)
does this map table contain a mapping for the parent to child.
|
boolean |
hasExcludedGroups()
are any contacts excluded ?
|
boolean |
isExcludeFromGroup(ContactGroup group,
Person person)
is the contact excluded from the group.
|
long |
nextNumber(java.lang.String key)
The next number for this data source
|
long |
nextNumber(java.lang.String key,
int cacheSize)
The next number for this data source
|
void |
setCacheObject(java.lang.String key,
java.lang.Object obj)
Set the data source's cache
|
@CheckReturnValue long nextNumber(@Nonnull java.lang.String key)
key
- The item key@CheckReturnValue long nextNumber(@Nonnull java.lang.String key, int cacheSize)
key
- The itemcacheSize
- The number of numbers to reserve@CheckReturnValue @Nonnull DBClass findDBClass(@Nonnull java.lang.String className) throws NotFoundException
className
- The name of the classNotFoundException
- The class was not found.@CheckReturnValue @Nonnull DBClassAbstract findDBClassAbstract(@Nonnull java.lang.String className) throws NotFoundException
className
- The name of the classNotFoundException
- The class was not found.@CheckReturnValue @Nonnull DBClass findDBClass(@Nonnull GlobalId classId) throws NotFoundException
classId
- The class to be foundNotFoundException
- Could not find the class@CheckReturnValue @Nonnull DBClassAbstract findDBClassAbstract(@Nonnull GlobalId classId) throws NotFoundException
classId
- The class to be foundNotFoundException
- Could not find the class@CheckReturnValue @Nullable Session getSession()
@CheckReturnValue @Nonnull DBObject create(@Nonnull java.lang.String className) throws java.lang.Exception
className
- The name of the class to createjava.lang.Exception
- A serious problem@CheckReturnValue @Nonnull Globals getGlobalObject() throws java.lang.Exception
java.lang.Exception
- A serious problem@Nonnull DBObject create(@Nonnull DBClass dbClass) throws java.lang.Exception
dbClass
- The class to createjava.lang.Exception
- A serious problem@Nonnull DBObject create(@Nonnull GlobalId classGid) throws java.lang.Exception
classGid
- The class to be createdjava.lang.Exception
- A serious problem@CheckReturnValue @Nonnull DBObject findKey(@Nonnull GlobalId valueId, @Nonnull GlobalId classId) throws NotFoundException
valueId
- The value of the keyclassId
- The class id of the keyNotFoundException
- The key was not found@CheckReturnValue @Nonnull DBObject findKey(@Nonnull GlobalId id, @Nonnull java.lang.String defName) throws NotFoundException
id
- The value iddefName
- The class nameNotFoundException
- The key was not found@CheckReturnValue @Nonnull DBObject findKey(@Nonnull GlobalKey gKey) throws NotFoundException
gKey
- The key to findNotFoundException
- The key was not found@CheckReturnValue @Nonnull DBObject findKey(@Nonnull java.lang.String value, @Nonnull java.lang.String defName) throws NotFoundException, TooManyRowsException, java.lang.Exception
value
- the value to finddefName
- The class namejava.lang.Exception
- a serious problemNotFoundException
- The key was not foundTooManyRowsException
- The key was not found@CheckReturnValue @Nonnull DBObject findRow(long rowId, @Nonnull DBClassConcrete def, @Nullable Hint hint) throws NotFoundException
hint
- A hint to the other rows that will be required.rowId
- The row id to founddef
- The class to findNotFoundException
- The row not found@CheckReturnValue @Nonnull DBResult getInwardLinkage(@Nonnull DBClass sourceClass, @Nonnull DBField sourceField, @Nullable DBObject target, @Nullable HintField hint) throws java.lang.Exception
sourceClass
- The class to search on ( Nonnull)sourceField
- The source field ( Nonnull)target
- The object that the field points to (Nullable)hint
- the other objects that will be searched ( Nullable)java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull VirtualDB getDataBase()
@CheckReturnValue @Nonnull DataSource getDataBaseReadOnly()
@CheckReturnValue @Nonnull DataSource getCurrentDataSource()
@CheckReturnValue @Nonnull Login getLogin()
@CheckReturnValue @Nonnull Login getRealLogin()
@CheckReturnValue @Nullable Person getUser()
@CheckReturnValue @Nonnull java.util.TimeZone getTimeZone()
@CheckReturnValue @Nullable java.lang.Object getCacheObject(@Nonnull java.lang.String key)
key
- The cache keyvoid setCacheObject(@Nonnull java.lang.String key, @Nullable java.lang.Object obj)
key
- The cache keyobj
- The object to cache@CheckReturnValue @Nullable java.lang.Object getAttribute(@Nonnull java.lang.String name)
name
- The attribute's name@CheckReturnValue DBQueryHandler getQueryHandler(@Nonnull DBClass searchClass)
searchClass
- The class to search@CheckReturnValue boolean hasChild(@Nonnull DBClass mapClass, @Nonnull DBField parentField, @Nonnull DBObject parentObject, @Nonnull DBField childField, @Nonnull DBObject childObject) throws java.lang.Exception
mapClass
- The map classparentField
- the parent linkparentObject
- the parent objectchildField
- the child linkchildObject
- the child objectjava.lang.Exception
- a serious problem@CheckReturnValue boolean isExcludeFromGroup(@Nonnull ContactGroup group, @Nonnull Person person)
person
- the person to check.group
- the group to check if the contact is excluded.@CheckReturnValue boolean hasExcludedGroups()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.