public class StateRegion extends DBObject
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
Identifies a state/region within a country.
|
static java.lang.String |
DBCLASS_NAME
Identifies a state/region within a country.
|
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
StateRegion(DBClass def,
DataSource dataSource)
Creates new State/Region
|
Modifier and Type | Method and Description |
---|---|
static StateRegion |
create(MutableDataSource mds)
Make a new instance of this class.
|
protected void |
eventFieldUpdated(DBField field,
java.lang.Object previous,
GlobalKey previousKey,
FldParams params)
update dependent fields.
|
protected void |
extCheckModifyAccess(DBField field)
May not change an State/Regions code/country.
|
protected void |
extSetValue(DBField field,
java.lang.Object currentValue,
FldParams params)
We prevent some values from being set by a user.
|
Country |
findCountry(java.lang.String... args)
Country.
|
static StateRegion |
findKey(DataSource ds,
java.lang.String key)
Find the target for this class by the primary key
|
static StateRegion |
findState(MutableDataSource mds,
java.lang.String country,
java.lang.String state) |
static StateRegion |
findStateByCodeOrName(DataSource ds,
Country country,
java.lang.String state)
find the state in the given country, if country is null, find the first matching state
|
java.lang.String |
getCode(java.lang.String... args) |
Country |
getCountry(java.lang.String... args) |
java.lang.String |
getName(java.lang.String... args) |
java.lang.String |
getStateRegionKey(java.lang.String... args) |
static DBQuery<StateRegion> |
makeQuery(DataSource ds)
Make a new QUERY for this class.
|
StateRegion |
setCode(java.lang.String value,
java.lang.String... args) |
StateRegion |
setCountry(com.aspc.dal.dbobj.misc.Country value,
java.lang.String... args) |
StateRegion |
setName(java.lang.String value,
java.lang.String... args) |
StateRegion |
setStateRegionKey(java.lang.String value,
java.lang.String... args) |
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyIncludeField, copyInwardLinks, delete, denormalizedResult, displayLogName, displayName, displayValue, doSearch, dump, equals, eventDataLoaded, extAutoEnterCreate, extCanDeleteDependantObject, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extCheckReadAccess, extCopy, extDelete, extDeleteRecord, extFixUp, extGetDerivedGlobalKey, extGetDerivedValue, extGetValue, extIsMandatory, extIsOnChange, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extPreDeleteRecord, extPreSaveRecord, extPreValidate, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extUndelete, extValidateDelete, extValidateField, extValidateRecord, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, touch, undelete, validateField, validateRecord, validateSubType
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public StateRegion(DBClass def, DataSource dataSource) throws java.lang.Exception
def
- The classdataSource
- The user datasourcejava.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public java.lang.String getStateRegionKey(java.lang.String... args)
@Nonnull public StateRegion setStateRegionKey(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCode(java.lang.String... args)
@Nonnull public StateRegion setCode(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public Country getCountry(java.lang.String... args)
@CheckReturnValue @Nonnull public final Country findCountry(java.lang.String... args) throws NotFoundException
Country
(String,
Searchable)args
- the optional argumentsNotFoundException
- Country was not found@Nonnull public StateRegion setCountry(com.aspc.dal.dbobj.misc.Country value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getName(java.lang.String... args)
@Nonnull public StateRegion setName(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull @CheckReturnValue public static StateRegion create(@Nonnull MutableDataSource mds) throws java.lang.Exception
mds
- the datasourcejava.lang.Exception
- an object of this class could not be created@Nonnull @CheckReturnValue public static DBQuery<StateRegion> makeQuery(@Nonnull DataSource ds) throws NotFoundException
ds
- the datasourceNotFoundException
- if class could not be found@Nonnull @CheckReturnValue public static StateRegion findKey(@Nonnull DataSource ds, @Nonnull java.lang.String key) throws NotFoundException, java.lang.Exception
ds
- the datasourcekey
- the valueNotFoundException
- if target could not be foundjava.lang.Exception
- a serious problempublic static StateRegion findState(MutableDataSource mds, java.lang.String country, java.lang.String state) throws java.lang.Exception
java.lang.Exception
@Nonnull public static StateRegion findStateByCodeOrName(DataSource ds, Country country, java.lang.String state) throws java.lang.Exception
ds
- country
- state
- java.lang.Exception
@OverridingMethodsMustInvokeSuper protected void extCheckModifyAccess(@Nonnull DBField field) throws DBAccessException
extCheckModifyAccess
in class DBObject
field
- The fieldDBAccessException
- You don't have accessprotected void extSetValue(DBField field, java.lang.Object currentValue, FldParams params) throws java.lang.Exception
extSetValue
in class DBObject
field
- The field that is being changedcurrentValue
- The new valueparams
- The extra parametersjava.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void eventFieldUpdated(@Nonnull DBField field, @Nullable java.lang.Object previous, @Nullable GlobalKey previousKey, @Nullable FldParams params) throws java.lang.Exception
eventFieldUpdated
in class DBObject
field
- The field updated.previous
- The previous value for this field.previousKey
- The previous keyparams
- The parameters usedjava.lang.Exception
- a serious problemstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.