Package | Description |
---|---|
sirius.db.es | |
sirius.db.es.constraints | |
sirius.db.jdbc |
Support layer for using JDBC (accessing SQL Databases).
|
sirius.db.jdbc.batch | |
sirius.db.jdbc.constraints | |
sirius.db.mixing | |
sirius.db.mixing.query | |
sirius.db.mixing.query.constraints | |
sirius.db.mongo |
Thin layer above Mongo DB.
|
sirius.db.mongo.constraints |
Modifier and Type | Field and Description |
---|---|
static Mapping |
ElasticEntity.ID
Contains the ID which is auto-generated when inserting a new entity into Elasticsearch.
|
Modifier and Type | Method and Description |
---|---|
ElasticQuery<E> |
ElasticQuery.addDateAggregation(String name,
Mapping field,
List<DateRange> ranges)
Adds a date (bucket) aggregation.
|
ElasticQuery<E> |
ElasticQuery.addTermAggregation(Mapping field)
Adds a term (bucket) aggregation for the given field.
|
ElasticQuery<E> |
ElasticQuery.addTermAggregation(String name,
Mapping field,
int size)
Adds a term (bucket) aggregation for the given field.
|
ElasticQuery<E> |
ElasticQuery.collapse(Mapping field)
Collapses by the given field.
|
protected boolean |
ElasticEntity.isUnique(Mapping field,
Object value,
Mapping... within) |
protected boolean |
ElasticEntity.isUnique(Mapping field,
Object value,
Mapping... within) |
ElasticQuery<E> |
ElasticQuery.orderAsc(Mapping field)
Adds an ascending sort by the given field to the query.
|
ElasticQuery<E> |
ElasticQuery.orderDesc(Mapping field)
Adds a descending sort by the given field to the query.
|
ElasticQuery<E> |
ElasticQuery.sort(Mapping field,
com.alibaba.fastjson.JSONObject sortSpec)
Adds a sort statement for the given field to the query.
|
Modifier and Type | Method and Description |
---|---|
protected ElasticConstraint |
ElasticQueryCompiler.compileSearchToken(Mapping field,
QueryField.Mode mode,
String value) |
sirius.db.es.constraints.ElasticCSVFilter |
ElasticFilterFactory.containsAll(Mapping field,
sirius.kernel.commons.Value commaSeparatedValues) |
sirius.db.es.constraints.ElasticCSVFilter |
ElasticFilterFactory.containsAny(Mapping field,
sirius.kernel.commons.Value commaSeparatedValues) |
NestedQuery |
NestedQuery.eq(Mapping field,
Object value)
Adds a simple
FilterFactory.eq(Mapping, Object) filter as inner filter. |
protected ElasticConstraint |
ElasticFilterFactory.eqValue(Mapping field,
Object value) |
ElasticConstraint |
ElasticFilterFactory.filled(Mapping field) |
protected ElasticConstraint |
ElasticFilterFactory.gtValue(Mapping field,
Object value,
boolean orEqual) |
protected ElasticConstraint |
ElasticFilterFactory.ltValue(Mapping field,
Object value,
boolean orEqual) |
NestedQuery |
ElasticFilterFactory.nested(Mapping field)
Executes a nested query.
|
ElasticConstraint |
ElasticFilterFactory.nestedMapContains(Mapping mapField,
String key,
String value)
Creates a filter which ensures, that a nested
StringMap
or StringListMap contains the given key and value. |
protected ElasticConstraint |
ElasticFilterFactory.neValue(Mapping field,
Object value) |
ElasticConstraint |
ElasticFilterFactory.notFilled(Mapping field) |
ElasticConstraint |
ElasticFilterFactory.prefix(Mapping field,
String value)
Creates a prefix query.
|
Constructor and Description |
---|
NestedQuery(Mapping path)
Creates a new nested query for elements in the given field / list.
|
Modifier and Type | Field and Description |
---|---|
static Mapping |
SQLEntity.ID
Contains the unique ID of the entity.
|
Modifier and Type | Field and Description |
---|---|
protected List<Mapping> |
SmartQuery.fields |
protected List<sirius.kernel.commons.Tuple<Mapping,Boolean>> |
SmartQuery.orderBys |
Modifier and Type | Method and Description |
---|---|
SmartQuery<E> |
SmartQuery.distinctFields(Mapping... fields)
Specifies the fields to select, which also have to be DISTINCT.
|
SmartQuery<E> |
SmartQuery.fields(Mapping... fields)
Specifies which fields to select.
|
protected boolean |
SQLEntity.isUnique(Mapping field,
Object value,
Mapping... within) |
protected boolean |
SQLEntity.isUnique(Mapping field,
Object value,
Mapping... within) |
SmartQuery<E> |
SmartQuery.orderAsc(Mapping field) |
SmartQuery<E> |
SmartQuery.orderDesc(Mapping field) |
String |
SmartQuery.Compiler.translateColumnName(Mapping column)
Translates a column name into an effective name by applying aliases and rewrites.
|
Modifier and Type | Method and Description |
---|---|
<E extends SQLEntity> |
BatchContext.deleteQuery(Class<E> type,
Mapping... mappingsToCompare)
Creates a new
delete query . |
<E extends SQLEntity> |
BatchContext.findQuery(Class<E> type,
Mapping... mappingsToCompare)
Creates a
find query . |
<E extends SQLEntity> |
BatchContext.insertQuery(Class<E> type,
boolean fetchId,
Mapping... mappingsToInsert)
Creates a new
insert query . |
<E extends SQLEntity> |
BatchContext.insertQuery(Class<E> type,
Mapping... mappingsToInsert)
Creates a new
insert query . |
protected static String[] |
BatchContext.simplifyMappings(Mapping[] mappingsToCompare) |
<E extends SQLEntity> |
BatchContext.updateByIdQuery(Class<E> type,
Mapping... mappingsToUpdate)
Creates a new
update query which uses SQLEntity.ID as mapping to compare. |
<E extends SQLEntity> |
BatchContext.updateQuery(Class<E> type,
Mapping... mappingsToCompare)
Creates a new
update query . |
UpdateQuery<E> |
UpdateQuery.withUpdatedMappings(Mapping... mappingsToUpdate)
Specifies the list of mappings to update.
|
Modifier and Type | Method and Description |
---|---|
protected SQLConstraint |
SQLQueryCompiler.compileSearchToken(Mapping field,
QueryField.Mode mode,
String value) |
protected SQLConstraint |
SQLFilterFactory.eqValue(Mapping field,
Object value) |
Exists |
SQLFilterFactory.existsIn(Mapping outerColumn,
Class<? extends SQLEntity> other,
Mapping innerColumn)
Generates an EXISTS clause: EXISTS(SELECT * FROM other WHERE e.outerColumn = other.innerColumn.
|
SQLConstraint |
SQLFilterFactory.filled(Mapping field) |
protected SQLConstraint |
SQLFilterFactory.gtValue(Mapping field,
Object value,
boolean orEqual) |
Like |
SQLFilterFactory.like(Mapping fields)
Creates a LIKE constraint for the given field.
|
protected SQLConstraint |
SQLFilterFactory.ltValue(Mapping field,
Object value,
boolean orEqual) |
protected SQLConstraint |
SQLFilterFactory.neValue(Mapping field,
Object value) |
SQLConstraint |
SQLFilterFactory.notFilled(Mapping field) |
Constructor and Description |
---|
Exists(Mapping outerColumn,
Class<? extends SQLEntity> other,
Mapping innerColumn) |
Like(Mapping field) |
Modifier and Type | Field and Description |
---|---|
protected Mapping |
Property.nameAsMapping
Represents the name of the property a
Mapping |
Modifier and Type | Method and Description |
---|---|
Mapping |
Mapping.getParent()
Returns the parent field.
|
Mapping |
Mapping.inMixin(Class<?> mixinType)
References a mixin for an inner composite or referenced type.
|
Mapping |
Mapping.inner(Mapping inner)
References an inner field of a composite represented by this mapping.
|
Mapping |
Mapping.join(Mapping joinMapping)
Joins the referenced field described by joinMapping.
|
static Mapping |
Mapping.mixin(Class<?> mixinType)
Creates a new Mapping for a mixin class.
|
static Mapping |
Mapping.named(String name)
Creates a new Mapping.
|
Mapping |
Mapping.nested(Mapping inner)
References a field of a nested list or map represented by this mapping.
|
Mapping |
Mapping.nested(String inner)
References a dynamic inner property of a nested map represented by this mapping.
|
Modifier and Type | Method and Description |
---|---|
protected void |
BaseEntity.assertUnique(Mapping field,
Object value,
Mapping... within)
Ensures that the given value in the given field is unique within the given side constraints.
|
protected void |
BaseEntity.assertUnique(Mapping field,
Object value,
Mapping... within)
Ensures that the given value in the given field is unique within the given side constraints.
|
Property |
EntityDescriptor.getProperty(Mapping column)
Returns the property for the given column.
|
Mapping |
Mapping.inner(Mapping inner)
References an inner field of a composite represented by this mapping.
|
boolean |
BaseEntity.isChanged(Mapping... mappingsToCheck)
|
protected abstract boolean |
BaseEntity.isUnique(Mapping field,
Object value,
Mapping... within)
Determines if the given value in the given field is unique within the given side constraints.
|
protected abstract boolean |
BaseEntity.isUnique(Mapping field,
Object value,
Mapping... within)
Determines if the given value in the given field is unique within the given side constraints.
|
Mapping |
Mapping.join(Mapping joinMapping)
Joins the referenced field described by joinMapping.
|
Mapping |
Mapping.nested(Mapping inner)
References a field of a nested list or map represented by this mapping.
|
Modifier and Type | Method and Description |
---|---|
Mapping |
QueryField.getField() |
Modifier and Type | Method and Description |
---|---|
protected C |
QueryCompiler.compileFieldEquals(Mapping field,
QueryCompiler.FieldValue value) |
protected abstract C |
QueryCompiler.compileSearchToken(Mapping field,
QueryField.Mode mode,
String value) |
static QueryField |
QueryField.contains(Mapping field)
Informs the compiler, that by default a fully expanding search like a contains query may be generated for this field.
|
static QueryField |
QueryField.eq(Mapping field)
Informs the compiler, that only real equality checks are permitted for this field.
|
Q |
Query.eq(Mapping field,
Object value)
Adds a constraint which ensures that the given field contains the given value.
|
Q |
Query.eqIgnoreNull(Mapping field,
Object value)
Adds a constraint which ensures that the given field contains the given value.
|
static QueryField |
QueryField.like(Mapping field)
Informs the compiler, that by default, equality checks are used for this field.
|
Q |
Query.ne(Mapping field,
Object value)
Adds a constraint which ensures that the given field does not contain the given value.
|
abstract Q |
Query.orderAsc(Mapping field)
Adds a sort constraint to order by the given field ascending.
|
abstract Q |
Query.orderDesc(Mapping field)
Adds a sort constraint to order by the given field descending.
|
static QueryField |
QueryField.startsWith(Mapping field)
Informs the compiler, that by default an expanding search like a prefix query may be generated for this field.
|
Modifier and Type | Field and Description |
---|---|
protected Mapping |
CSVFilter.field |
protected Mapping |
OneInField.field |
Modifier and Type | Method and Description |
---|---|
CSVFilter<C> |
FilterFactory.containsAll(Mapping field,
sirius.kernel.commons.Value commaSeparatedValues)
Creates a new constraint for the given field which asserts that all of the given values in the string is
present.
|
CSVFilter<C> |
FilterFactory.containsAny(Mapping field,
sirius.kernel.commons.Value commaSeparatedValues)
Creates a new constraint for the given field which asserts that one of the given values in the string is
present.
|
C |
FilterFactory.containsNone(Mapping field,
Object... values)
Creates a constraint which ensures that the given field doesn't contain any of the given values.
|
OneInField<C> |
FilterFactory.containsOne(Mapping field,
Object... values)
Creates a filter builder which ensures that the given field contains at least on of the given values.
|
C |
FilterFactory.eq(Mapping field,
Object value)
Represents field = value as constraint
|
C |
FilterFactory.eqIgnoreEmpty(Mapping field,
Object value)
Represents field = value as constraint
However, if the value is null, no constraint will be generated.
|
C |
FilterFactory.eqOrEmpty(Mapping field,
Object value)
Represents field = value OR empty(field) as constraint
|
protected abstract C |
FilterFactory.eqValue(Mapping field,
Object value)
Represents field = value as constraint
|
abstract C |
FilterFactory.filled(Mapping field)
Generates a constraint which ensures that the given field is filled (not null)
|
C |
FilterFactory.gt(Mapping field,
Object value)
Represents field > value as constraint
|
C |
FilterFactory.gte(Mapping field,
Object value)
Represents field >= value as constraint
|
C |
FilterFactory.gteOrEmpty(Mapping field,
Object value)
Represents field >= value OR empty(field) as constraint
|
C |
FilterFactory.gtOrEmpty(Mapping field,
Object value)
Represents field > value OR empty(field) as constraint
|
protected abstract C |
FilterFactory.gtValue(Mapping field,
Object value,
boolean orEqual)
Represents field > value as constraint
|
C |
FilterFactory.lt(Mapping field,
Object value)
Represents field < value as constraint
|
C |
FilterFactory.lte(Mapping field,
Object value)
Represents field <= value as constraint
|
C |
FilterFactory.lteOrEmpty(Mapping field,
Object value)
Represents field <= OR empty(field) value as constraint
|
C |
FilterFactory.ltOrEmpty(Mapping field,
Object value)
Represents field < OR empty(field) value as constraint
|
protected abstract C |
FilterFactory.ltValue(Mapping field,
Object value,
boolean orEqual)
Represents field < value as constraint
|
C |
FilterFactory.ne(Mapping field,
Object value)
Represents field !
|
protected abstract C |
FilterFactory.neValue(Mapping field,
Object value)
Represents field !
|
C |
FilterFactory.noneInField(Mapping field,
List<Object> values)
Creates a constraint which ensures that the given field doesn't contain any of the given values.
|
abstract C |
FilterFactory.notFilled(Mapping field)
Generates a constraint which ensures that the given field is not filled (null)
|
OneInField<C> |
FilterFactory.oneInField(Mapping field,
List<Object> values)
Creates a filter builder which ensures that the given field contains at least on of the given values.
|
Constructor and Description |
---|
CSVFilter(FilterFactory<C> factory,
Mapping field,
String value,
CSVFilter.Mode mode) |
OneInField(FilterFactory<C> factory,
Mapping field,
Collection<Object> values) |
Modifier and Type | Field and Description |
---|---|
static Mapping |
MongoEntity.ID
Contains the id of the entity.
|
Modifier and Type | Method and Description |
---|---|
Updater |
Updater.addToSet(Mapping field,
Object value)
Adds the given value to the given set / list.
|
MongoQuery<E> |
MongoQuery.eq(Mapping key,
Object value) |
MongoQuery<E> |
MongoQuery.eqIgnoreNull(Mapping field,
Object value) |
MongoQuery<E> |
MongoQuery.fields(Mapping... fieldsToReturn)
Limits the fields being returned to the given list.
|
sirius.kernel.commons.Value |
Doc.get(Mapping field)
Returns the value of the requested field wrapped as
Value . |
List<Object> |
Doc.getList(Mapping field)
Returns the list contained in the given field
|
org.bson.Document |
Doc.getObject(Mapping field)
Returns the object stored for the given field.
|
String |
Doc.getString(Mapping field)
Returns the string contents of the given field
|
List<String> |
Doc.getStringList(Mapping field)
Returns the list of strings contained in the given field
|
sirius.kernel.commons.Value |
Doc.getValueInObject(Mapping field,
String key)
Returns the inner value stored in the object in the given field.
|
Updater |
Updater.inc(Mapping field,
int value)
Increments the given field by the given value.
|
protected boolean |
MongoEntity.isUnique(Mapping field,
Object value,
Mapping... within) |
protected boolean |
MongoEntity.isUnique(Mapping field,
Object value,
Mapping... within) |
MongoQuery<E> |
MongoQuery.orderAsc(Mapping field) |
Finder |
Finder.orderByAsc(Mapping field)
Adds a sort constraint to order by the given field ascending.
|
Finder |
Finder.orderByDesc(Mapping field)
Adds a sort constraint to order by the given field descending.
|
MongoQuery<E> |
MongoQuery.orderDesc(Mapping field) |
Updater |
Updater.pull(Mapping field,
Object value)
Removes all occurences of the given value from the list in the given field.
|
Updater |
Updater.pullAll(Mapping field,
Object... values)
Removes all occurences of the given values from the list in the given field.
|
void |
Doc.put(Mapping key,
Object value)
Updates the underlying object, without updating the database.
|
Finder |
Finder.selectFields(Mapping... fieldsToReturn)
Limits the fields being returned to the given list.
|
Inserter |
Inserter.set(Mapping key,
Object value)
Sets a field to the given value.
|
Updater |
Updater.set(Mapping field,
Object value)
Sets a field to a new value.
|
Inserter |
Inserter.setList(Mapping key,
Object... values)
Sets a field to the given list of values.
|
Updater |
Updater.setList(Mapping key,
Object... values)
Sets a field to the given list of values.
|
Updater |
Updater.unset(Mapping field)
Unsets a field.
|
S |
QueryBuilder.where(Mapping key,
Object value)
Adds a condition which determines which documents should be selected.
|
Modifier and Type | Method and Description |
---|---|
protected MongoConstraint |
MongoQueryCompiler.compileSearchToken(Mapping field,
QueryField.Mode mode,
String value) |
protected MongoConstraint |
MongoFilterFactory.eqValue(Mapping field,
Object value) |
MongoConstraint |
MongoFilterFactory.filled(Mapping field) |
protected MongoConstraint |
MongoFilterFactory.gtValue(Mapping field,
Object value,
boolean orEqual) |
protected MongoConstraint |
MongoFilterFactory.ltValue(Mapping field,
Object value,
boolean orEqual) |
MongoConstraint |
MongoFilterFactory.nearSphere(Mapping key,
org.bson.Document geometry,
int maxDistanceMeters)
Builds a filter which represents a geospatial query.
|
MongoConstraint |
MongoFilterFactory.nearSphere(Mapping key,
double lat,
double lon,
int maxDistanceMeters)
Builds a filter which represents a geospatial query for a point.
|
protected MongoConstraint |
MongoFilterFactory.neValue(Mapping field,
Object value) |
MongoConstraint |
MongoFilterFactory.noneInField(Mapping field,
List<Object> values) |
MongoConstraint |
MongoFilterFactory.notFilled(Mapping field) |
OneInField<MongoConstraint> |
MongoFilterFactory.oneInField(Mapping field,
List<Object> values) |
MongoConstraint |
MongoFilterFactory.regex(Mapping key,
Object expression,
String options)
Builds a filter which represents a regex filter for the given field and expression.
|
Copyright © 2018. All rights reserved.