| Package | Description |
|---|---|
| org.jsimpledb |
Abstraction layer allowing access to a
Database using normal Java objects. |
| org.jsimpledb.change |
Classes passed to
@OnChange-annotated methods. |
| Modifier and Type | Class and Description |
|---|---|
class |
UntypedJObject
Represents a
JObject for which no Java model type is defined in the current schema. |
| Modifier and Type | Method and Description |
|---|---|
<T extends JObject> |
JTransaction.get(T jobj)
Get the Java model object with the same object ID as the given
JObject and whose state derives from this transaction. |
| Modifier and Type | Method and Description |
|---|---|
JObject |
JObject.copyIn(String... refPaths)
Copy this instance, and other instances it references through the specified
refPaths (if any),
into the transaction associated with the current thread. |
JObject |
JObject.copyOut(String... refPaths)
Snapshot this instance and other instances it references through the specified
refPaths (if any). |
JObject |
JTransaction.copyTo(JTransaction dest,
JObject srcObj,
ObjId dstId,
CopyState copyState,
String... refPaths)
Copy the specified object, and any other objects referneced through the specified reference paths,
into the specified destination transaction.
|
JObject |
JObject.copyTo(JTransaction dest,
ObjId target,
CopyState copyState,
String... refPaths)
Copy this instance, and other instances it references through the specified
refPaths (if any), into a (possibly)
different JTransaction. |
JObject |
JTransaction.get(ObjId id)
Get the Java model object that is associated with this transaction and has the given ID.
|
JObject |
ValidationException.getObject()
Get the object that failed to validate.
|
JObject |
JReferenceField.getValue(JObject jobj) |
| Modifier and Type | Method and Description |
|---|---|
Converter<ObjId,JObject> |
JReferenceField.getConverter(JTransaction jtx) |
Iterable<JObject> |
JSimpleDB.getReferencedObjects(JObject jobj)
Utility method to get all of the objects directly referenced by a given object via any field.
|
Set<ConstraintViolation<JObject>> |
ValidationException.getViolations()
Get the validation errors in case validation failed due to a failed JSR 303 validation check.
|
| Modifier and Type | Method and Description |
|---|---|
JObject |
JTransaction.copyTo(JTransaction dest,
JObject srcObj,
ObjId dstId,
CopyState copyState,
String... refPaths)
Copy the specified object, and any other objects referneced through the specified reference paths,
into the specified destination transaction.
|
boolean |
JTransaction.delete(JObject jobj)
Delete the object with the given object ID in this transaction.
|
byte[] |
JTransaction.getKey(JObject jobj)
Get the
byte[] key in the underlying key/value store corresponding to the specified object. |
byte[] |
JTransaction.getKey(JObject jobj,
String fieldName)
Get the
byte[] key in the underlying key/value store corresponding to the specified field in the specified object. |
static Class<?> |
JSimpleDB.getModelClass(JObject jobj)
Get the Java model class of the given
JObject. |
Iterable<JObject> |
JSimpleDB.getReferencedObjects(JObject jobj)
Utility method to get all of the objects directly referenced by a given object via any field.
|
Object |
JSimpleField.getValue(JObject jobj) |
NavigableSet<?> |
JSetField.getValue(JObject jobj) |
JObject |
JReferenceField.getValue(JObject jobj) |
NavigableMap<?,?> |
JMapField.getValue(JObject jobj) |
List<?> |
JListField.getValue(JObject jobj) |
abstract Object |
JField.getValue(JObject jobj)
Get the Java value of this field in the given Java model object.
|
Counter |
JCounterField.getValue(JObject jobj) |
abstract Collection<?> |
JCollectionField.getValue(JObject jobj) |
boolean |
JTransaction.recreate(JObject jobj)
Recreate the given instance in this transaction.
|
static void |
JTransaction.registerJObject(JObject jobj)
Ensure the given
JObject is registered in its associated transaction's object cache. |
void |
JSimpleField.setValue(JObject jobj,
Object value)
Set the Java value of this field in the given object.
|
boolean |
JTransaction.updateSchemaVersion(JObject jobj)
Update the schema version of the specified object, if necessary, so that its version matches
the schema version associated with this instance's
JSimpleDB. |
void |
JTransaction.writeSimpleField(JObject jobj,
int storageId,
Object value,
boolean updateVersion)
Write a simple field.
|
| Modifier and Type | Method and Description |
|---|---|
void |
JTransaction.copyTo(JTransaction dest,
CopyState copyState,
Iterable<? extends JObject> jobjs)
Copy the objects in the specified
Iterable into the specified destination transaction. |
<T> NavigableSet<T> |
JTransaction.invertReferencePath(Class<T> startType,
String path,
Iterable<? extends JObject> targetObjects)
Find all objects that refer to any object in the given target set through the specified path of references.
|
| Constructor and Description |
|---|
ValidationException(JObject jobj,
Set<ConstraintViolation<JObject>> violations,
String message)
Constructor.
|
ValidationException(JObject jobj,
String message)
Convenience constructor for use when JSR 303 validation is not involved.
|
ValidationException(JObject jobj,
String message,
Throwable cause)
Convenience constructor for use when JSR 303 validation is not involved.
|
| Constructor and Description |
|---|
ValidationException(JObject jobj,
Set<ConstraintViolation<JObject>> violations,
String message)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected JObject |
ChangeCopier.copy(JObject jobj)
Copy the given
JObject into the destination transaction. |
JObject |
Change.getJObject()
Get the Java model object containing the field that changed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Change.apply(JObject jobj)
Apply this change to the specified object.
|
void |
SimpleFieldChange.apply(JTransaction jtx,
JObject jobj) |
void |
SetFieldRemove.apply(JTransaction jtx,
JObject jobj) |
void |
SetFieldClear.apply(JTransaction jtx,
JObject jobj) |
void |
SetFieldAdd.apply(JTransaction jtx,
JObject jobj) |
void |
ObjectDelete.apply(JTransaction jtx,
JObject jobj) |
void |
ObjectCreate.apply(JTransaction jtx,
JObject jobj) |
void |
MapFieldReplace.apply(JTransaction jtx,
JObject jobj) |
void |
MapFieldRemove.apply(JTransaction jtx,
JObject jobj) |
void |
MapFieldClear.apply(JTransaction jtx,
JObject jobj) |
void |
MapFieldAdd.apply(JTransaction jtx,
JObject jobj) |
void |
ListFieldReplace.apply(JTransaction jtx,
JObject jobj) |
void |
ListFieldRemove.apply(JTransaction jtx,
JObject jobj) |
void |
ListFieldClear.apply(JTransaction jtx,
JObject jobj) |
void |
ListFieldAdd.apply(JTransaction jtx,
JObject jobj) |
abstract void |
Change.apply(JTransaction jtx,
JObject jobj)
Apply this change to the given object in the given transaction.
|
protected JObject |
ChangeCopier.copy(JObject jobj)
Copy the given
JObject into the destination transaction. |
Copyright © 2017. All rights reserved.