public class BigDataJsonEntry extends AbstractSQLFragment
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION |
static java.lang.String |
BYTES |
static java.lang.String |
COL |
static java.lang.String |
ERROR |
static java.lang.String |
FIELD |
static java.lang.String |
MASK |
static java.lang.String |
REJECT |
static java.lang.String |
REPLACE |
static java.lang.String |
SETNULL |
static java.lang.String |
TRUNCATE |
static java.lang.String |
TYPE
Type String for the BigDataEntry object.
|
static java.lang.String |
VALUE |
AS, COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, LEFT_PAREN, NEWLINE, RIGHT_PAREN, SPACE
Constructor and Description |
---|
BigDataJsonEntry()
Creates a new, empty BigDataJsonEntry.
|
BigDataJsonEntry(java.lang.String name,
SQLFragment valueFragment)
Creates a BigDataJsonEntry with the given name and value.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Collection<java.lang.String> |
getAllowedValueStrings(java.lang.String entryName,
java.lang.String paramName,
Relation table)
Gets the allow values for the given json entry value as Strings.
|
static java.lang.String |
getDefaultValueString(java.lang.String entryName,
java.lang.String paramName)
Gets the default value for the given entry as a String.
|
static java.lang.String |
getExtendedEntryName(java.lang.String entryName,
java.lang.String entryValue,
java.lang.String paramName)
Gets the name of the "extended entry" that is expected in the parent
BigDataJsonObject for the given entry information.
|
static Tuple<java.lang.String,java.lang.String> |
getJsonEntryNames(java.lang.String paramName)
If the given big data access parameter name is a json object with two
entries, this returns the entry names.
|
java.lang.String |
getName()
Gets the name of this big data json entry.
|
java.lang.String |
getSQLText()
Constructs the SQL text for this entry.
|
java.lang.String |
getType()
Returns the type of this object.
|
SQLFragment |
getValueFragment()
Gets the fragment that respresents the value for this entry.
|
java.lang.String |
getValueSQLText()
Gets the text for the value portion of this entry.
|
static boolean |
hasExtendedEntry(java.lang.String entryName,
java.lang.String paramName)
Tests whether the given entry has an "extended entry".
|
static boolean |
isJsonEntryOptional(java.lang.String paramName,
java.lang.String entryName)
Tests whether the given entry is optional in the json syntax for a
parameter.
|
void |
setValueFragment(SQLFragment value)
Sets the fragment that respresents the value for this entry.
|
appendToBuffer, appendToBuffer, argsToString, getStartOffset, getTextOrNull, getTextOrNull, setStartOffset, surroundWithBrackets, surroundWithBrackets, toString
setParent
checkInit, checkInit, copyToImpl, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization, processPropertyChange, setID
addObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getChildSupport, getID, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setName, setProperties, setProperty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getParent, setParent
addObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName, setProperties, setProperty
public static final java.lang.String TYPE
public static final java.lang.String ACTION
public static final java.lang.String BYTES
public static final java.lang.String COL
public static final java.lang.String FIELD
public static final java.lang.String MASK
public static final java.lang.String VALUE
public static final java.lang.String ERROR
public static final java.lang.String TRUNCATE
public static final java.lang.String SETNULL
public static final java.lang.String REJECT
public static final java.lang.String REPLACE
public BigDataJsonEntry()
public BigDataJsonEntry(java.lang.String name, SQLFragment valueFragment)
name
- the name of the entryvalueFragment
- the value of the entry as a SQLFragment.public java.lang.String getType()
DBObject
getType
in interface DBObject
getType
in class AbstractSQLFragment
public java.lang.String getName()
getName
in interface DBObject
getName
in class AbstractSQLFragment
public SQLFragment getValueFragment()
public void setValueFragment(SQLFragment value)
value
- the value fragmentpublic java.lang.String getSQLText()
"name" : "value"The value isn't quoted if it is an array or sub-object.
public java.lang.String getValueSQLText()
public static Tuple<java.lang.String,java.lang.String> getJsonEntryNames(java.lang.String paramName)
paramName
- the name of the access parameter to testpublic static boolean isJsonEntryOptional(java.lang.String paramName, java.lang.String entryName)
getJsonEntryNames(String)
.paramName
- the big data access parameter the entry is in the json
value forentryName
- the name of the json entrypublic static java.util.Collection<java.lang.String> getAllowedValueStrings(java.lang.String entryName, java.lang.String paramName, Relation table)
entryName
- the name of the json entryparamName
- the name of the access parameter this entry is within
the value fortable
- the owning relation (used to get allowed column names)public static java.lang.String getDefaultValueString(java.lang.String entryName, java.lang.String paramName)
entryName
- the entryparamName
- the parameterpublic static boolean hasExtendedEntry(java.lang.String entryName, java.lang.String paramName)
entryName
- the name of the entryparamName
- the name of the parent access parametergetExtendedEntryName(String,String,String)
public static java.lang.String getExtendedEntryName(java.lang.String entryName, java.lang.String entryValue, java.lang.String paramName)
entryName
- the name of the entry to testentryValue
- the value of the entry to testparamName
- the name of the parent access parameterhasExtendedEntry(String,String)