public class RestDefinitionSQL extends RestDefinition implements RestPluginSupportedMethods, RestPluginProducedTypes
DBObject.DenormalizeAction| Modifier and Type | Field and Description |
|---|---|
static GlobalId |
DBCLASS_GID
SQL based ReST definition
|
static java.lang.String |
DBCLASS_NAME
SQL based ReST definition
|
JSON_KEY_RESULTS, JSON_KEY_SUCCESS, PARAMETER_ACCEPT, PARAMETER_MAGIC, PARAMETER_METHOD, REST_DEFINITION_ATTRIBUTE, SUPRESS_DEPRECATION_WARNINGATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS| Constructor and Description |
|---|
RestDefinitionSQL(DBClass theClass,
DataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
RestServerResponse |
convertResult(RestDefinition rd,
WebClient client,
ContentType type,
java.lang.Object value)
Convert the result
|
protected boolean |
extIsMandatory(DBField field)
OVERRIDE This method to specify fields should be mandatory under certain conditions.
|
java.lang.String |
getCreateSQL(java.lang.String... args) |
java.lang.String |
getDeleteSQL(java.lang.String... args) |
java.lang.String |
getHeadSQL(java.lang.String... args) |
java.lang.String |
getRetrieveSQL(java.lang.String... args) |
java.lang.String |
getUpdateSQL(java.lang.String... args) |
boolean |
isValidVariableName(java.lang.String code) |
ContentType[] |
listProducedTypes(Method method)
List of produced types
|
Method[] |
listSupportedMethods()
List of methods supported.
|
java.lang.Object |
restCreate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP POST calls the the Create ReST service.
|
java.lang.Object |
restDelete(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP DELETE calls the the Delete ReST service.
|
java.lang.Object |
restRetrieve(WebClient client,
RestDefinition restDefinition,
ReadOnlyDataSource rds)
HTTP GET calls the the Retrieval ReST service.
|
java.lang.Object |
restUpdate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP PUT calls the the Update ReST service.
|
java.lang.Object |
retrieval(DataSource rds,
java.lang.String sql,
java.lang.String baseURI,
int offset,
int limit) |
RestDefinitionSQL |
setCreateSQL(java.lang.String value,
java.lang.String... args) |
RestDefinitionSQL |
setDeleteSQL(java.lang.String value,
java.lang.String... args) |
RestDefinitionSQL |
setHeadSQL(java.lang.String value,
java.lang.String... args) |
RestDefinitionSQL |
setRetrieveSQL(java.lang.String value,
java.lang.String... args) |
RestDefinitionSQL |
setUpdateSQL(java.lang.String value,
java.lang.String... args) |
java.lang.Object |
write(MutableDataSource mds,
java.lang.String sql) |
checkAccess, checkMagicNumber, checkVariables, create, defaultRestPluginContentType, defaultRestPluginConvertResult, defaultRestPluginDS, defaultRestPluginProcess, defaultRestPluginThrottling, disableDefaultTransformers, extFixUp, extGetDerivedValue, extPreSaveRecord, extPreValidate, extValidateField, find, findCopyFrom, findKey, findLifeCycle, findTransform, getAliases, getCode, getConfigurationJSON, getConsumesDELETE, getConsumesPOST, getConsumesPUT, getCopyFrom, getCorsAllowedHosts, getCounterKey, getDeprecatedNoLongerAvailable, getDeprecatedReason, getKey, getLifeCycle, getParserVersion, getPath, getPeriod, getPlugin, getRequestLimit, getSummary, getSummaryDELETE, getSummaryDELETERaw, getSummaryGET, getSummaryGETRaw, getSummaryPOST, getSummaryPOSTRaw, getSummaryPUT, getSummaryPUTRaw, getTags, getTargetContentType, getThrottlingPeriod, getThrottlingRequestLimit, getUsage, getUsageDELETE, getUsageDELETERaw, getUsageGET, getUsageGETRaw, getUsagePOST, getUsagePOSTRaw, getUsagePUT, getUsagePUTRaw, getVersion, hasModifyAccess, isApplicableTo, isApplicableToDELETE, isApplicableToGET, isApplicableToPOST, isApplicableToPUT, isDeprecated, isFinalFg, makeFile, makeList, makeQuery, makeValue, makeValueBoolean, makeValueDouble, makeValueInt, makeValueLong, parseSQL, process, restReadDS, restWriteDS, setAliases, setCode, setConfigurationJSON, setConsumesDELETE, setConsumesPOST, setConsumesPUT, setCopyFrom, setCorsAllowedHosts, setDeprecated, setDeprecatedNoLongerAvailable, setDeprecatedReason, setDisableDefaultTransformers, setFinalFg, setKey, setLifeCycle, setParserVersion, setPlugin, setSummary, setSummaryDELETERaw, setSummaryGETRaw, setSummaryPOSTRaw, setSummaryPUTRaw, setTags, setThrottlingPeriod, setThrottlingRequestLimit, setUsage, setUsageDELETERaw, setUsageGETRaw, setUsagePOSTRaw, setUsagePUTRaw, setVersionaddReloadEventListener, 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, eventFieldUpdated, extAutoEnterCreate, extCanDeleteDependantObject, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extCheckModifyAccess, extCheckReadAccess, extCopy, extDelete, extDeleteRecord, extGetDerivedGlobalKey, extGetValue, extIsOnChange, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extPreDeleteRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extSetValue, extUndelete, extValidateDelete, 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, validateSubTypepublic static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public RestDefinitionSQL(DBClass theClass, DataSource dataSource) throws java.lang.Exception
java.lang.Exception@CheckReturnValue @Nonnull public java.lang.String getCreateSQL(java.lang.String... args)
@Nonnull public RestDefinitionSQL setCreateSQL(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception@CheckReturnValue @Nonnull public java.lang.String getDeleteSQL(java.lang.String... args)
@Nonnull public RestDefinitionSQL setDeleteSQL(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception@CheckReturnValue @Nonnull public java.lang.String getHeadSQL(java.lang.String... args)
@Nonnull public RestDefinitionSQL setHeadSQL(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception@CheckReturnValue @Nonnull public java.lang.String getRetrieveSQL(java.lang.String... args)
@Nonnull public RestDefinitionSQL setRetrieveSQL(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception@CheckReturnValue @Nonnull public java.lang.String getUpdateSQL(java.lang.String... args)
@Nonnull public RestDefinitionSQL setUpdateSQL(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception@CheckReturnValue protected boolean extIsMandatory(DBField field)
DBObjectextIsMandatory in class RestDefinitionfield - The field to check@CheckReturnValue public boolean isValidVariableName(java.lang.String code)
isValidVariableName in class RestDefinitionpublic java.lang.Object restCreate(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcessrestCreate in interface RestPluginProcessrestCreate in class RestDefinitionclient - the client. Null means check only of opsrestDefinition - the definitionmds - the data source to usejava.lang.UnsupportedOperationException - if this method is NOT supported.ExceptionResponse - an error has occurred.java.lang.Exceptionpublic java.lang.Object restRetrieve(WebClient client, RestDefinition restDefinition, ReadOnlyDataSource rds) throws java.lang.Exception
RestPluginProcessrestRetrieve in interface RestPluginProcessrestRetrieve in class RestDefinitionclient - the client. Null means check only of opsrestDefinition - the definitionrds - the data source to usejava.lang.UnsupportedOperationException - if this method is NOT supported.java.lang.Exception - an error has occurred.public java.lang.Object restUpdate(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcessrestUpdate in interface RestPluginProcessrestUpdate in class RestDefinitionclient - the client. Null means check only of opsrestDefinition - the definitionmds - the data source to usejava.lang.UnsupportedOperationException - if this method is NOT supported.ExceptionResponse - an error has occurred.java.lang.Exceptionpublic java.lang.Object restDelete(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcessrestDelete in interface RestPluginProcessrestDelete in class RestDefinitionclient - the client. Null means check only of opsrestDefinition - the definitionmds - the data source to use.java.lang.UnsupportedOperationException - if this method is NOT supported.ExceptionResponse - an error has occurred.java.lang.Exceptionpublic java.lang.Object write(MutableDataSource mds, java.lang.String sql) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object retrieval(DataSource rds, java.lang.String sql, java.lang.String baseURI, int offset, int limit) throws java.lang.Exception
java.lang.Exceptionpublic Method[] listSupportedMethods() throws java.lang.Exception
RestPluginSupportedMethodslistSupportedMethods in interface RestPluginSupportedMethodsjava.lang.Exceptionpublic ContentType[] listProducedTypes(Method method) throws ExceptionResponse
RestPluginProducedTypeslistProducedTypes in interface RestPluginProducedTypesmethod - the methodExceptionResponsepublic RestServerResponse convertResult(RestDefinition rd, WebClient client, ContentType type, java.lang.Object value) throws java.lang.Exception
RestPluginConvertResultconvertResult in interface RestPluginConvertResultconvertResult in class RestDefinitionrd - the definitionclient - the clienttype - the target typevalue - the value to be converted.java.lang.Exception - a serious problem.stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.