public final class ArchiveDataSource extends java.lang.Object implements DataSource
| Constructor and Description |
|---|
ArchiveDataSource(DataSource ds,
java.util.Date asOfDate)
create a archive data source
|
ArchiveDataSource(DataSource ds,
java.util.Date asOfDate,
boolean forceUseOfJournalData,
boolean doNotUseCurrentData,
TransHeader beforeTransaction)
create a archive data source
|
ArchiveDataSource(Login login,
java.util.Date asOfDate)
create a archive data source
|
ArchiveDataSource(Login login,
java.util.Date asOfDate,
boolean forceUseOfJournalData,
boolean doNotUseCurrentData,
TransHeader beforeTransaction)
create a archive data source
|
ArchiveDataSource(Session session,
java.util.Date asOfDate)
create a archive data source
|
ArchiveDataSource(Session session,
java.util.Date asOfDate,
boolean forceUseOfJournalData,
boolean doNotUseCurrentData,
TransHeader beforeTransaction)
create a archive data source
|
| Modifier and Type | Method and Description |
|---|---|
DBObject |
archivedVersion(DBData data,
DBClass def,
Hint hint) |
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.
|
void |
exclude(TransHeader th)
exclude this transaction
|
TransHeader[] |
excludedTransactions()
the excluded transactions
|
DBClass |
findDBClass(GlobalId classId)
Find the object definition
|
DBClass |
findDBClass(java.lang.String className)
Finds the Definition of a Object
NOT Archive date sensitive. |
DBClassAbstract |
findDBClassAbstract(GlobalId classId)
Find the object definition
|
DBClassAbstract |
findDBClassAbstract(java.lang.String className)
Finds the Definition of a Object
NOT Archive date sensitive. |
DBObject |
findKey(GlobalId valueId,
GlobalId classId)
Find an object by it's key
|
DBObject |
findKey(GlobalId id,
java.lang.String className)
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
|
TransHeader |
findMaxTransHeader(VirtualDB layer)
find the maximum transaction for this archive date.
|
DBObject |
findRow(long rowId,
DBClassConcrete def,
Hint hint)
Finds a DBObject by it's rowId with a hint of what's next
|
GlobalKey |
findRowGlobalKey(long rowId,
DBClass rawClass,
Hint hint) |
java.util.Date |
getAsOfDate()
What is the as of date for this Archive data source.
|
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()
Returns itself.
|
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 login
|
Session |
getSession()
Get the current session
|
java.util.TimeZone |
getTimeZone()
Get the timeZone used for date/time processing
|
Person |
getUser()
Returns the User for this MutableDataSource.
|
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 |
isDoNotUseCurrentData()
do not use the current data.
|
boolean |
isExcludeFromGroup(ContactGroup group,
Person person)
is the contact excluded from the group.
|
boolean |
isForceUseOfJournalData()
Should we force the use of journal data even if the "ignore journal data" is checked for a class.
|
DALQuery |
makeQuery(java.lang.String className) |
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
Read Only return -1
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets general purpose attributes
|
void |
setCacheObject(java.lang.String key,
java.lang.Object obj)
Set the data source's cache
|
void |
setTimeZone(java.util.TimeZone tz) |
java.lang.String |
toString()
to String
|
public ArchiveDataSource(@Nonnull
Login login,
@Nonnull
java.util.Date asOfDate)
login - the loginasOfDate - the date to usepublic ArchiveDataSource(@Nonnull
Session session,
@Nonnull
java.util.Date asOfDate)
session - the sessionasOfDate - the date to usepublic ArchiveDataSource(@Nonnull
DataSource ds,
@Nonnull
java.util.Date asOfDate)
ds - the data sourceasOfDate - the date to usepublic ArchiveDataSource(@Nonnull
Login login,
@Nonnull
java.util.Date asOfDate,
boolean forceUseOfJournalData,
boolean doNotUseCurrentData,
@Nullable
TransHeader beforeTransaction)
login - the loginasOfDate - the date to useforceUseOfJournalData - force the use of journal data even if the "ignore journal data" is checked for a class.doNotUseCurrentData - do not use the current version of the data.beforeTransaction - before this transactionpublic ArchiveDataSource(@Nonnull
Session session,
@Nonnull
java.util.Date asOfDate,
boolean forceUseOfJournalData,
boolean doNotUseCurrentData,
@Nullable
TransHeader beforeTransaction)
session - the sessionasOfDate - the date to useforceUseOfJournalData - force the use of journal data even if the "ignore journal data" is checked for a class.doNotUseCurrentData - do not use the current version of the data.beforeTransaction - before this transactionpublic ArchiveDataSource(@Nonnull
DataSource ds,
@Nonnull
java.util.Date asOfDate,
boolean forceUseOfJournalData,
boolean doNotUseCurrentData,
@Nullable
TransHeader beforeTransaction)
ds - the data sourceasOfDate - the date to useforceUseOfJournalData - force the use of journal data even if the "ignore journal data" is checked for a class.doNotUseCurrentData - do not use the current version of the data.beforeTransaction - before this transaction@CheckReturnValue @Nonnull public java.lang.String toString()
toString in class java.lang.Object@CheckReturnValue @Nonnull public TransHeader[] excludedTransactions()
public void exclude(@Nonnull
TransHeader th)
th - the transaction.@CheckReturnValue public boolean isForceUseOfJournalData()
@CheckReturnValue public boolean isDoNotUseCurrentData()
@CheckReturnValue
public boolean isExcludeFromGroup(@Nonnull
ContactGroup group,
@Nonnull
Person person)
isExcludeFromGroup in interface DataSourceperson - the person to check.group - the group to check if the contact is excluded.@CheckReturnValue public boolean hasExcludedGroups()
hasExcludedGroups in interface DataSource@CheckReturnValue
public boolean hasChild(@Nonnull
DBClass mapClass,
@Nonnull
DBField parentField,
@Nonnull
DBObject parentObject,
@Nonnull
DBField childField,
@Nonnull
DBObject childObject)
throws java.lang.Exception
hasChild in interface DataSourcemapClass - The map classparentField - the parent linkparentObject - the parent objectchildField - the child linkchildObject - the child objectjava.lang.Exception - Exception A serious problem@CheckReturnValue @Nonnull public DataSource getCurrentDataSource()
getCurrentDataSource in interface DataSource@CheckReturnValue @Nullable public Session getSession()
getSession in interface DataSource@CheckReturnValue
public long nextNumber(@Nonnull
java.lang.String key,
int cacheSize)
nextNumber in interface DataSourcekey - The itemcacheSize - The number of numbers to reserve@CheckReturnValue @Nonnull public Login getLogin()
getLogin in interface DataSource@Nonnull public Login getRealLogin()
getRealLogin in interface DataSource@CheckReturnValue @Nullable public Person getUser()
getUser in interface DataSource@CheckReturnValue @Nonnull public java.util.TimeZone getTimeZone()
getTimeZone in interface DataSourcepublic void setTimeZone(@Nonnull
java.util.TimeZone tz)
tz - the time zone@CheckReturnValue @Nonnull public DBResult getInwardLinkage(@Nonnull DBClass sourceClass, @Nonnull DBField sourceField, @Nullable DBObject target, @Nullable HintField hint) throws java.lang.Exception
getInwardLinkage in interface DataSourcesourceClass - the source classsourceField - The source fieldhint - the hinttarget - The object that the field points tojava.lang.Exception - a serious problem.@CheckReturnValue @Nonnull public DBObject findKey(@Nonnull GlobalKey gKey) throws NotFoundException
findKey in interface DataSourcegKey - The key to findNotFoundException - The key was not found@CheckReturnValue @Nonnull public TransHeader findMaxTransHeader(@Nonnull VirtualDB layer) throws java.lang.Exception
layer - the layerjava.lang.Exception - a serious problem@CheckReturnValue @Nonnull public java.util.Date getAsOfDate()
@CheckReturnValue @Nonnull public DBObject findRow(long rowId, @Nonnull DBClassConcrete def, @Nullable Hint hint) throws NotFoundException
findRow in interface DataSourcedef - the class to findhint - a hint for the other rows to load.rowId - The row id to foundNotFoundException - The row not found@CheckReturnValue @Nonnull public GlobalKey findRowGlobalKey(long rowId, @Nonnull DBClass rawClass, @Nullable Hint hint) throws NotFoundException
rowId - the rowrawClass - the classhint - the hintNotFoundException - not found@CheckReturnValue @Nonnull public DBObject archivedVersion(DBData data, DBClass def, Hint hint) throws NotFoundException
def - the classhint - the hintdata - the dataNotFoundException - not found@CheckReturnValue @Nonnull public DBObject findKey(GlobalId id, java.lang.String className) throws NotFoundException
findKey in interface DataSourceclassName - the class nameid - The value idNotFoundException - The key was not found@CheckReturnValue @Nonnull public DBObject create(@Nonnull DBClass dbClass) throws java.lang.Exception
create in interface DataSourcedbClass - The class to createjava.lang.Exception - A serious problem@CheckReturnValue @Nonnull public DBObject create(java.lang.String className) throws java.lang.Exception
create in interface DataSourceclassName - The name of the class to createjava.lang.Exception - A serious problem@CheckReturnValue @Nonnull public DBClass findDBClass(GlobalId classId) throws NotFoundException
findDBClass in interface DataSourceclassId - The class to be foundNotFoundException - Could not find the class@CheckReturnValue @Nonnull public DBClass findDBClass(java.lang.String className) throws NotFoundException
findDBClass in interface DataSourceclassName - The name of the classNotFoundException - The class was not found.@CheckReturnValue @Nonnull public DBClassAbstract findDBClassAbstract(GlobalId classId) throws NotFoundException
findDBClassAbstract in interface DataSourceclassId - The class to be foundNotFoundException - Could not find the class@CheckReturnValue @Nonnull public DBClassAbstract findDBClassAbstract(java.lang.String className) throws NotFoundException
findDBClassAbstract in interface DataSourceclassName - The name of the classNotFoundException - The class was not found.@CheckReturnValue @Nonnull public Globals getGlobalObject() throws java.lang.Exception
getGlobalObject in interface DataSourcejava.lang.Exception - A serious problem@CheckReturnValue @Nonnull public DBObject findKey(GlobalId valueId, GlobalId classId) throws NotFoundException
findKey in interface DataSourcevalueId - The value of the keyclassId - The class id of the keyNotFoundException - The key was not found@CheckReturnValue @Nonnull public DBObject findKey(java.lang.String value, java.lang.String defName) throws NotFoundException, TooManyRowsException, java.lang.Exception
findKey in interface DataSourcevalue - the valuedefName - The class namejava.lang.Exception - a serious problemNotFoundException - The key was not foundTooManyRowsException - The key was not found@CheckReturnValue @Nonnull public DBObject create(GlobalId classGid) throws java.lang.Exception
create in interface DataSourceclassGid - The class to be createdjava.lang.Exception - A serious problem@CheckReturnValue
public long nextNumber(@Nonnull
java.lang.String key)
nextNumber in interface DataSourcekey - The item key@CheckReturnValue @Nonnull public VirtualDB getDataBase()
getDataBase in interface DataSource@CheckReturnValue @Nonnull public DataSource getDataBaseReadOnly()
getDataBaseReadOnly in interface DataSource@CheckReturnValue @Nonnull public DBQueryHandler getQueryHandler(DBClass searchClass)
getQueryHandler in interface DataSourcesearchClass - the class to searchpublic void setCacheObject(@Nonnull
java.lang.String key,
@Nullable
java.lang.Object obj)
DataSourcesetCacheObject in interface DataSourcekey - the keyobj - the object@CheckReturnValue
@Nullable
public java.lang.Object getCacheObject(@Nonnull
java.lang.String key)
DataSourcegetCacheObject in interface DataSourcekey - the keypublic void setAttribute(@Nonnull
java.lang.String name,
@Nonnull
java.lang.Object value)
name - the namevalue - the value@CheckReturnValue
@Nullable
public java.lang.Object getAttribute(@Nonnull
java.lang.String name)
getAttribute in interface DataSourcename - the namepublic DALQuery makeQuery(java.lang.String className)
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.