Package org.nustaq.reallive.records
Class MapRecord
java.lang.Object
org.nustaq.reallive.records.MapRecord
- All Implemented Interfaces:
Serializable,Record,EvalContext
Created by ruedi on 04.08.2015.
a record stored by reallive.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancalled by the persistance layer after a record has been loaded from disk. can be used for type migration of an existing database.booleanbooleanString[]getKey()longlonginthashCode()voidinternal_put(String key, Object value) voidinternal_setLastModified(long tim) take care, kind of dangerousstatic voidstatic MapRecordstatic MapRecordputs a key value pair. type checking is applied to ensure data is json compatible.intsize()toString()transformCopy(TransformFunction transform) copies recursively applying given function to each value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.nustaq.reallive.api.Record
asDouble, asList, asLong, asMap, asSet, asString, deepCopy, deepMerge, defaultEquals, getArr, getAsList, getBool, getDouble, getInt, getKeyVals, getLong, getRec, getRecord, getSafeString, getString, getValue, haveRec, internal_updateLastModified, join, mget, mgetNum, mgetString, omit, putTransforming, reduced, stripOps, toJson, toPrettyString, validateForJsonability
-
Field Details
-
JDK_TYPE_CHECK
-
JSON_CHECKER
-
recordClass
-
conversion
-
map
-
fields
-
key
-
lastModified
protected long lastModified -
seq
protected long seq
-
-
Constructor Details
-
MapRecord
protected MapRecord()
-
-
Method Details
-
New
-
New
-
size
public int size() -
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
-
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
-
shallowCopy
- Specified by:
shallowCopyin interfaceRecord- Returns:
- a shallow copy
-
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:
-
equals
-
hashCode
public int hashCode() -
getFieldSet
- Specified by:
getFieldSetin interfaceRecord
-
main
-
_afterLoad
public boolean _afterLoad()Description copied from interface:Recordcalled by the persistance layer after a record has been loaded from disk. can be used for type migration of an existing database. return true if the record should be re-persisted- Specified by:
_afterLoadin interfaceRecord
-
containsKey
- Specified by:
containsKeyin interfaceRecord
-