org.jpox.store.mapping
Class Mappings

java.lang.Object
  extended byorg.jpox.store.mapping.Mappings

public class Mappings
extends java.lang.Object

Helper class for doing many tasks with mapping

Version:
$Revision: 1.28 $

Constructor Summary
Mappings()
           
 
Method Summary
static int[] getParametersIndex(int initialPosition, JavaTypeMapping mapping)
          Get the indexes/position for Mapping columns in a given the initial position.
static void selectMapping(QueryExpression qs, DatastoreIdentifier tableIdentifier, StatementExpressionIndex[] statementExpressionIndex)
          Add columns to a query.
static void selectMapping(QueryExpression qs, StatementExpressionIndex[] statementExpressionIndex)
          Add columns to a query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mappings

public Mappings()
Method Detail

selectMapping

public static void selectMapping(QueryExpression qs,
                                 StatementExpressionIndex[] statementExpressionIndex)
Add columns to a query. Columns added to the query are obtained from the mappings included in the statementExpressionIndex passed as parameter. After adding columns to the query, statementExpressionIndex is updated with the index/position of the columns in the query.

Parameters:
qs - the Query Statement
statementExpressionIndex - the list of mapping/column indexes to be included in the query

selectMapping

public static void selectMapping(QueryExpression qs,
                                 DatastoreIdentifier tableIdentifier,
                                 StatementExpressionIndex[] statementExpressionIndex)
Add columns to a query. Columns added to the query are obtained from the mappings included in the statementExpressionIndex passed as parameter. After adding columns to the query, statementExpressionIndex is updated with the index/position of the columns in the query.

Parameters:
qs - the Query Statement
tableIdentifier - the Identifier for the table which the columns are from (may be null, if TODO)
statementExpressionIndex - the list of mapping/column indexes to be included in the query

getParametersIndex

public static int[] getParametersIndex(int initialPosition,
                                       JavaTypeMapping mapping)
Get the indexes/position for Mapping columns in a given the initial position. Used to set parameters in PreparedStatements

Parameters:
initialPosition - the initialPosition
mapping - the Mapping
Returns:
an array containing indexes for parameters


Copyright © -2007 . All Rights Reserved.