Package org.nustaq.reallive.records
Class RecordWrapper
java.lang.Object
org.nustaq.reallive.records.RecordWrapper
- All Implemented Interfaces:
Serializable,Record,EvalContext
- Direct Known Subclasses:
PatchingRecord
Created by ruedi on 22/08/15.
base for app specific typed wrappers. Wrappers submitted/stored to reallive will be automatically unwrapped
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanString[]getKey()longlonginthashCode()voidinternal_put(String key, Object value) voidinternal_setLastModified(long tim) voidtake care, kind of dangerousputs a key value pair. type checking is applied to ensure data is json compatible.toString()transformCopy(TransformFunction transform) copies recursively applying given function to each value.static <T> RecordWrapperMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.nustaq.reallive.api.Record
_afterLoad, asDouble, asList, asLong, asMap, asSet, asString, deepCopy, deepMerge, defaultEquals, getArr, getAsList, getBool, getDouble, getFieldSet, getInt, getKeyVals, getLong, getRec, getSafeString, getString, getValue, haveRec, join, mget, mgetNum, mgetString, omit, putTransforming, reduced, stripOps, toJson, toPrettyString, validateForJsonability
-
Field Details
-
record
-
-
Constructor Details
-
RecordWrapper
-
RecordWrapper
-
-
Method Details
-
Wrap
-
getRecord
-
containsKey
- Specified by:
containsKeyin interfaceRecord
-
getKey
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceRecord
-
internal_setLastModified
public void internal_setLastModified(long tim) - Specified by:
internal_setLastModifiedin interfaceRecord
-
internal_incSequence
public void internal_incSequence()- Specified by:
internal_incSequencein interfaceRecord
-
getSequence
public long getSequence()- Specified by:
getSequencein interfaceRecord
-
internal_put
- Specified by:
internal_putin interfaceRecord
-
internal_updateLastModified
public void internal_updateLastModified()- Specified by:
internal_updateLastModifiedin interfaceRecord
-
key
Description copied from interface:Recordtake care, kind of dangerous -
getFields
-
get
- Specified by:
getin interfaceEvalContext
-
put
Description copied from interface:Recordputs a key value pair. type checking is applied to ensure data is json compatible. if value is null, the key is removed. -
toString
-
equals
-
hashCode
public int hashCode() -
shallowCopy
- Specified by:
shallowCopyin interfaceRecord- Returns:
- a shallow (!) copy of this record
-
transformCopy
Description copied from interface:Recordcopies recursively applying given function to each value. if the transform returns v, its an identity copy if the transform returns null, the given key is removed from outer record. (if outer container is array, its removed)- Specified by:
transformCopyin interfaceRecord- Returns:
-