public class ReadFromVJPA extends ExecutableOperator implements RecordSourceOperator, VJPAConnectConfigurable
Modifier and Type | Field and Description |
---|---|
static String |
JPQL_QUERY_STRING_PROPERTY_NAME |
Constructor and Description |
---|
ReadFromVJPA()
Creates an instance of the V/JPA reader operator using the default V/JPA method to
create an EntityManagerFactory instance for internal use.
|
ReadFromVJPA(com.pervasive.datarush.operators.io.vjpa.internal.db.EntityManagerFactoryFactory factoryFactory)
Creates an instance of the V/JPA reader operator using the given method to
create an EntityManagerFactory instance for internal use.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeMetadata(StreamingMetadataContext smc)
Implementations must adhere to the following contracts
|
protected void |
execute(ExecutionContext context)
Executes the operator.
|
String |
getConnectionUrl()
The URL specifying the V/JPA database(s) to query.
|
String |
getJpqlQueryString()
The JPQL query string to be executed.
|
RecordPort |
getOutput()
The results from the JPA query, corresponding to the specified or auto-generated output type.
|
RecordTokenType |
getOutputType()
The specified output record schema.
|
String |
getPassword()
The password configured for the V/JPA connection.
|
String |
getUnitName()
The name of the persistence unit in the persistence.xml.
|
String |
getUser()
The user name configured for the V/JPA connection.
|
void |
setConnectionUrl(String connectionUrl)
Sets the URL for the V/JPA database(s) to query.
|
void |
setJpqlQueryString(String jpqlQueryString)
Sets the JPQL query string to be executed.
|
void |
setOutputType(RecordTokenType outputType)
Sets the specified output record schema.
|
void |
setPassword(String password)
Sets the password for the V/JPA connection.
|
void |
setUnitName(String unitName)
Sets the name of the persistence unit in the persistence.xml.
|
void |
setUser(String user)
Sets the user name for the V/JPA connection.
|
cloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutput
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public static final String JPQL_QUERY_STRING_PROPERTY_NAME
public ReadFromVJPA()
public ReadFromVJPA(com.pervasive.datarush.operators.io.vjpa.internal.db.EntityManagerFactoryFactory factoryFactory)
factoryFactory
- A method to create an EntityManagerFactory instanceprotected void execute(ExecutionContext context)
ExecutableOperator
execute
in class ExecutableOperator
context
- context in which to lookup physical ports bound to logical portsprotected void computeMetadata(StreamingMetadataContext smc)
StreamingOperator
StreamingMetadataContext.parallelize(ParallelismStrategy)
.
RecordPort.setRequiredDataOrdering(com.pervasive.datarush.operators.MetadataCalculationContext, com.pervasive.datarush.ports.record.DataOrdering)
, otherwise data may arrive in any order.
RecordPort.setRequiredDataDistribution(com.pervasive.datarush.operators.MetadataCalculationContext, com.pervasive.datarush.ports.record.DataDistribution)
, otherwise data will arrive in an unspecified partial distribution
.
RecordPort.getSourceDataDistribution(com.pervasive.datarush.operators.MetadataContext)
and RecordPort.getSourceDataOrdering(com.pervasive.datarush.operators.MetadataContext)
. These should be
viewed as a hints to help chose a more efficient algorithm. In such cases, though, operators must
still declare data ordering and data distribution requirements; otherwise there is no guarantee that
data will arrive sorted/distributed as required.
RecordPort.setType(com.pervasive.datarush.operators.MetadataCalculationContext, com.pervasive.datarush.types.RecordTokenType)
.RecordPort.setOutputDataOrdering(com.pervasive.datarush.operators.MetadataCalculationContext, com.pervasive.datarush.ports.record.DataOrdering)
RecordPort.setOutputDataDistribution(com.pervasive.datarush.operators.MetadataCalculationContext, com.pervasive.datarush.ports.record.DataDistribution)
AbstractModelPort.setMergeHandler(com.pervasive.datarush.operators.MetadataCalculationContext, com.pervasive.datarush.ports.model.ModelMergeHandler<T>)
.MergeModel
is a convenient, re-usable model reducer, parameterized with
a merge-handler.
SimpleModelPort
's have no associated metadata and therefore there is
never any output metadata to declare. PMMLPort
's, on the other hand,
do have associated metadata. For all PMMLPorts, implementations must declare
the following:
PMMLPort.setPMMLModelSpec
.
computeMetadata
in class StreamingOperator
smc
- the contextpublic String getConnectionUrl()
setUnitName(String)
is specified. If both unit name and connection URL are specified,
the connection URL will override the value declared in the given unit in the persistence.xml. If only a
connection URL is given, the connection will use V/JPA generic mode.getConnectionUrl
in interface VJPAConnectConfigurable
public void setConnectionUrl(String connectionUrl)
setUnitName(String)
is specified. If both unit name and connection URL are specified,
the connection URL will override the value declared in the given unit in the persistence.xml. If only a
connection URL is given, the connection will use V/JPA generic mode.setConnectionUrl
in interface VJPAConnectConfigurable
connectionUrl
- A V/JPA connection URLpublic String getUser()
getUser
in interface VJPAConnectConfigurable
public void setUser(String user)
setUser
in interface VJPAConnectConfigurable
user
- A user namepublic String getPassword()
getPassword
in interface VJPAConnectConfigurable
public void setPassword(String password)
setPassword
in interface VJPAConnectConfigurable
password
- A passwordpublic String getUnitName()
setConnectionUrl(String)
is specified.public void setUnitName(String unitName)
setConnectionUrl(String)
is specified.unitName
- The persistence unit namepublic String getJpqlQueryString()
public void setJpqlQueryString(String jpqlQueryString)
public RecordTokenType getOutputType()
public void setOutputType(RecordTokenType outputType)
outputType
- The output record schemapublic RecordPort getOutput()
getOutput
in interface RecordSourceOperator
getOutput
in interface SourceOperator<RecordPort>
setOutputType(RecordTokenType)
Copyright © 2015 Actian Corporation. All Rights Reserved.