Package org.apache.cayenne.reflect

Examples of org.apache.cayenne.reflect.AttributeProperty


                    if (id.isReplacementIdAttached()) {

                        Map<String, Object> replacement = id.getReplacementIdMap();
                        Iterator<Property> idProperties = descriptor.getIdProperties();
                        while (idProperties.hasNext()) {
                            AttributeProperty property = (AttributeProperty) idProperties
                                    .next();
                            Object value = replacement.get(property
                                    .getAttribute()
                                    .getDbAttributeName());

                            // TODO: andrus, 11/28/2006: this operation may be redundant
                            // if the id wasn't generated. We may need to optimize it...
                            if (value != null) {
                                property.writePropertyDirectly(object, null, value);
                            }
                        }

                        ObjectId replacementId = id.createReplacementId();
View Full Code Here


                ClassDescriptor descriptor = context.getEntityDescriptor(id);
                if (descriptor == null) {
                    throw new EJBQLException("Unmapped id variable: " + id);
                }
                String pathChunk = translator.lastPathComponent;
                AttributeProperty property = (AttributeProperty) descriptor
                        .getProperty(pathChunk);
                String atrType = property.getAttribute().getType();

                type = TypesMapping.getSqlNameByType(TypesMapping
                        .getSqlTypeByJava(atrType));

            }
View Full Code Here

                    if (id.isReplacementIdAttached()) {

                        Map<String, Object> replacement = id.getReplacementIdMap();
                        Iterator<Property> idProperties = descriptor.getIdProperties();
                        while (idProperties.hasNext()) {
                            AttributeProperty property = (AttributeProperty) idProperties
                                    .next();
                            Object value = replacement.get(property
                                    .getAttribute()
                                    .getDbAttributeName());

                            // TODO: andrus, 11/28/2006: this operation may be redundant
                            // if the id wasn't generated. We may need to optimize it...
                            if (value != null) {
                                property.writePropertyDirectly(object, null, value);
                            }
                        }

                        ObjectId replacementId = id.createReplacementId();
View Full Code Here

                ClassDescriptor descriptor = context.getEntityDescriptor(id);
                if (descriptor == null) {
                    throw new EJBQLException("Unmapped id variable: " + id);
                }
                String pathChunk = translator.lastPathComponent;
                AttributeProperty property = (AttributeProperty) descriptor
                        .getProperty(pathChunk);
                String atrType = property.getAttribute().getType();
               
                type = TypesMapping.getSqlNameByType(TypesMapping.getSqlTypeByJava(atrType));

            }
            context.popMarker();
View Full Code Here

                    if (id.isReplacementIdAttached()) {

                        Map<String, Object> replacement = id.getReplacementIdMap();
                        Iterator<Property> idProperties = descriptor.getIdProperties();
                        while (idProperties.hasNext()) {
                            AttributeProperty property = (AttributeProperty) idProperties
                                    .next();
                            Object value = replacement.get(property
                                    .getAttribute()
                                    .getDbAttributeName());

                            // TODO: andrus, 11/28/2006: this operation may be redundant
                            // if the id wasn't generated. We may need to optimize it...
                            if (value != null) {
                                property.writePropertyDirectly(object, null, value);
                            }
                        }

                        ObjectId replacementId = id.createReplacementId();
View Full Code Here

                    if (id.isReplacementIdAttached()) {

                        Map<String, Object> replacement = id.getReplacementIdMap();
                        Iterator<Property> idProperties = descriptor.getIdProperties();
                        while (idProperties.hasNext()) {
                            AttributeProperty property = (AttributeProperty) idProperties
                                    .next();
                            Object value = replacement.get(property
                                    .getAttribute()
                                    .getDbAttributeName());

                            // TODO: andrus, 11/28/2006: this operation may be redundant
                            // if the id wasn't generated. We may need to optimize it...
                            if (value != null) {
                                property.writePropertyDirectly(object, null, value);
                            }
                        }

                        ObjectId replacementId = id.createReplacementId();
View Full Code Here

                    if (id.isReplacementIdAttached()) {

                        Map replacement = id.getReplacementIdMap();
                        Iterator idProperties = descriptor.getIdProperties();
                        while (idProperties.hasNext()) {
                            AttributeProperty property = (AttributeProperty) idProperties
                                    .next();
                            Object value = replacement.get(property
                                    .getAttribute()
                                    .getDbAttributeName());

                            // TODO: andrus, 11/28/2006: this operation may be redundant
                            // if the id wasn't generated. We may need to optimize it...
                            if (value != null) {
                                property.writePropertyDirectly(object, null, value);
                            }
                        }

                        ObjectId replacementId = id.createReplacementId();
View Full Code Here

        }
        return null;
    }

    private Integer getParentExpressionSqlType(EJBQLExpression expression) {
        AttributeProperty lastPathAttribute = getParentExpressionLastPathChildAttribute(expression);
        return lastPathAttribute == null ? null : lastPathAttribute
                .getAttribute()
                .getDbAttribute()
                .getType();
    }
View Full Code Here

                .getDbAttribute()
                .getType();
    }

    private String getParentExpressionSqlTypeName(EJBQLExpression expression) {
        AttributeProperty lastPathAttribute = getParentExpressionLastPathChildAttribute(expression);
        if (lastPathAttribute != null) {
            String atrType = lastPathAttribute.getAttribute().getType();
            return TypesMapping.getSqlNameByType(TypesMapping.getSqlTypeByJava(atrType));
        }
        return null;
    }
View Full Code Here

                    if (id.isReplacementIdAttached()) {

                        Map replacement = id.getReplacementIdMap();
                        Iterator idProperties = descriptor.getIdProperties();
                        while (idProperties.hasNext()) {
                            AttributeProperty property = (AttributeProperty) idProperties
                                    .next();
                            Object value = replacement.get(property
                                    .getAttribute()
                                    .getDbAttributeName());

                            // TODO: andrus, 11/28/2006: this operation may be redundant
                            // if the id wasn't generated. We may need to optimize it...
                            if (value != null) {
                                property.writePropertyDirectly(object, null, value);
                            }
                        }

                        ObjectId replacementId = id.createReplacementId();
View Full Code Here

TOP

Related Classes of org.apache.cayenne.reflect.AttributeProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.