E - as entity typeE - as input Entity typeT - as return typepublic class ODBQueryTransformer<E> extends ODBQueryTransformer<E,com.orientechnologies.orient.core.record.impl.ODocument>
Input types to transformer : Transformer accepts inputs of type Object[] or Collection or Map or PageInfo.
Collection will be converted to an Object[].
Object[] or a List PageInfo as the input itself or last param in the parameter Array; if pagination is required Map to this Transformer. When a Map is passed then Query parameters are the "Keys" passed in this Map.Structure of Prepared Queries :
OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<ODocument>("SELECT FROM Profile WHERE name = ? AND surname = ?");
OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<ODocument>("SELECT FROM Profile WHERE name = :name AND surname = :surname");
Functions to query from database :
OSQLSynchQuery or OSQLAsynchQuery as parameter. No such non deprecated solution was available when last checked. Refer to neurosys doc here
UpdatableContext,
Transformer,
OResultSet,
StackOverFlow : Link for question asked on stackoverflow related to research on whether query requires a param.,
Serialized FormconnectionPool, expectSingleResult, fieldMapping, lastConnection, paramAsSingleInput, query| Constructor and Description |
|---|
ODBQueryTransformer() |
ODBQueryTransformer(ODBQueryTransformer t) |
ODBQueryTransformer(String query,
com.orientechnologies.orient.core.db.OPartitionedDatabasePool connectionPool) |
| Modifier and Type | Method and Description |
|---|---|
protected com.orientechnologies.orient.core.db.ODatabase |
getConnection() |
apply, close, getConnectionPool, getFieldMapping, getQuery, isExpectSingleResult, isParamAsSingleInput, setConnectionPool, setExpectSingleResult, setFieldMapping, setParamAsSingleInput, setQuery, transform, updateContextpublic ODBQueryTransformer()
public ODBQueryTransformer(String query, com.orientechnologies.orient.core.db.OPartitionedDatabasePool connectionPool)
public ODBQueryTransformer(ODBQueryTransformer t)
protected com.orientechnologies.orient.core.db.ODatabase getConnection()
getConnection in class ODBQueryTransformer<E,com.orientechnologies.orient.core.record.impl.ODocument>Copyright © 2018. All rights reserved.