/** * INTERNAL * (): * Answer true if the SELECTed node has a left and right, and the right represents * a direct-to-field mapping. */ public boolean endsWithDirectToField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); return (mapping != null) && mapping.isDirectToFieldMapping(); }
/** * INTERNAL * (): * Answer true if the SELECTed node has a left and right, and the right represents * a direct-to-field mapping. */ public boolean endsWithDirectToField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); return (mapping != null) && mapping.isDirectToFieldMapping(); }
/** * INTERNAL * (): * Answer true if the node has a left and right, and the right represents * a collection mapping. */ public boolean endsWithCollectionField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); return (mapping != null) && mapping.isCollectionMapping(); }
/** * INTERNAL * (): * Answer true if the SELECTed node has a left and right, and the right represents * a direct-to-field mapping. */ public boolean endsWithDirectToField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); return (mapping != null) && mapping.isDirectToFieldMapping(); }
/** * INTERNAL * (): * Answer true if the node has a left and right, and the right represents * a collection mapping. */ public boolean endsWithCollectionField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); return (mapping != null) && mapping.isCollectionMapping(); }
/** * INTERNAL * (): * Answer true if the node has a left and right, and the right represents * a collection mapping. */ public boolean endsWithCollectionField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); return (mapping != null) && mapping.isCollectionMapping(); }
/** * INTERNAL * Returns the attribute type if the right represents a direct-to-field mapping. */ public Class getTypeOfDirectToField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); if ((mapping != null) && mapping.isDirectToFieldMapping()) { return ((AbstractDirectMapping)mapping).getAttributeClassification(); } return null; }
/** * INTERNAL * Returns the attribute type if the right represents a direct-to-field mapping. */ public Class getTypeOfDirectToField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); if ((mapping != null) && mapping.isDirectToFieldMapping()) { return ((DirectToFieldMapping)mapping).getAttributeClassification(); } return null; }
/** * INTERNAL * Returns the attribute type if the right represents a direct-to-field mapping. */ public Class getTypeOfDirectToField(GenerationContext context) { DatabaseMapping mapping = resolveMapping(context); if ((mapping != null) && mapping.isDirectToFieldMapping()) { return ((AbstractDirectMapping)mapping).getAttributeClassification(); } return null; }
/** * INTERNAL * Return a TopLink expression by getting the required variables using the * left and right nodes * "emp.address.city" = builder.get("address").get("city") */ public Expression generateExpression(GenerationContext context) { Node right = getRight(); if (enumConstant != null) { // enum literal access return new ConstantExpression(enumConstant, new ExpressionBuilder()); } else { // Get the left expression Expression whereClause = getLeft().generateExpression(context); // Calculate the mapping and pass it to the right expression if (right.isAttributeNode()) { ((AttributeNode)right).setMapping(resolveMapping(context)); } // Or it with whatever the right expression is whereClause = right.addToExpression(whereClause, context); if (alias != null){ context.addExpression(whereClause, alias); } // and return the expression... return whereClause; } }
/** * INTERNAL * Return a TopLink expression by getting the required variables using the * left and right nodes * "emp.address.city" = builder.get("address").get("city") */ public Expression generateExpression(GenerationContext context) { Node right = getRight(); if (enumConstant != null) { // enum literal access return new ConstantExpression(enumConstant, new ExpressionBuilder()); } else { // Get the left expression Expression whereClause = getLeft().generateExpression(context); // Calculate the mapping and pass it to the right expression if (right.isAttributeNode()) { ((AttributeNode)right).setMapping(resolveMapping(context)); } // Or it with whatever the right expression is whereClause = right.addToExpression(whereClause, context); if (alias != null){ context.addExpression(whereClause, alias); } // and return the expression... return whereClause; } }
((AttributeNode)right).setMapping(resolveMapping(context));