Examples of CColumn


Examples of org.caffinitas.mapper.annotations.CColumn

    }

    private void handleSet(DataModel model) {
        verifyType(Set.class);

        CColumn setElement = set != null ? set.element() : null;
        DataType elemDataType = collectionElementType(model, setElement, 0, 1);

        dataType = DataType.set(elemDataType);
        collectionDataType = elemDataType;
    }
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

    }

    private void handleList(DataModel model) {
        verifyType(List.class);

        CColumn collectionElement = list != null ? list.element() : null;
        DataType elemDataType = collectionElementType(model, collectionElement, 0, 1);

        dataType = DataType.list(elemDataType);
        collectionDataType = elemDataType;
    }
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

    }

    private void handleMap(DataModel model) {
        verifyType(Map.class);

        CColumn keyElement = map != null ? map.key() : null;
        CColumn valueElement = map != null ? map.value() : null;
        DataType keyDataType = collectionElementType(model, keyElement, 0, 2);
        DataType valueDataType = collectionElementType(model, valueElement, 1, 2);

        dataType = DataType.map(keyDataType, valueDataType);
        collectionDataType = keyDataType;
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

    }

    @Override void setupClassColumns(PersistenceManagerImpl persistenceManager, MappedObject container, List<CqlColumn> cqlColumns, DataModel model,
                                     ParseAttribute parseAttribute, AttrOverrideMap attributeOverrides,
                                     NameMapper nameMapper, String columnNamePrefix) {
        CColumn column = parseAttribute.column;

        attributeOverrides = attributeOverrides.forPrefix(parseAttribute.attrName);
        attributeOverrides = attributeOverrides.merge(parseAttribute.attributeOverrides);
        ParseEntity parseEntity = model.entities.get(parseAttribute.attrType);
        refEntity = persistenceManager.getEntity(parseAttribute.attrType);
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

                    l);
        }

        for (int i = 0; i < l; i++) {

            CColumn column = cols.length > 0 ? cols[i] : null;
            CIgnore ignore = ignores.length > 0 ? ignores[i] : null;

            String columnName = makeColumnName(attributeOverrides, nameMapper, columnNamePrefix, column, pNames[i]);

            boolean allowNotExists = ignore != null && ignore.notExists();
            boolean ignoreTypeMismatch = ignore != null && ignore.typeMismatch();
            boolean staticCol = column != null && column.isStatic();

            DataType dataType = column != null ? column.type().getDataType() : null;
            if (dataType == null) {
                dataType = ParseAttribute.guessDataTypeName(cTypes[i], null, accessor.accessible()).getDataType();
            }

            CqlColumn cqlColumn =
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

    }

    static void setupSingleColumn(MappedAttribute mappedAttribute, ParseAttribute parseAttribute,
                                  AttrOverrideMap attributeOverrides, NameMapper nameMapper, String columnNamePrefix) {
        CColumn column = parseAttribute.column;
        CIgnore ignore = parseAttribute.ignore;

        String columnName = mappedAttribute.makeColumnName(attributeOverrides, nameMapper, columnNamePrefix, column);

        boolean allowNotExists = ignore != null && ignore.notExists();
        boolean ignoreTypeMismatch = ignore != null && ignore.typeMismatch();
        boolean staticCol = column != null && column.isStatic();

        CqlColumn cqlColumn =
            allowNotExists || ignoreTypeMismatch || staticCol || mappedAttribute.lazy
                ? new CqlColumnSimple(columnName, parseAttribute.dataType, allowNotExists, ignoreTypeMismatch, staticCol, mappedAttribute.lazy)
                : new CqlColumnSimpleStd(columnName, parseAttribute.dataType);
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

        ParseClass parseClass = model.entities.get(parseAttribute.attrType);
        if (parseClass == null) {
            parseClass = model.composites.get(parseAttribute.attrType);
        }

        CColumn column = parseAttribute.column;
        attributeOverrides = attributeOverrides.forPrefix(parseAttribute.attrName);
        attributeOverrides = attributeOverrides.merge(parseAttribute.attributeOverrides);
        columnNamePrefix = makeColumnName(attributeOverrides, nameMapper, columnNamePrefix, column);

        for (MappedAttribute mappedAttribute : allAttributes) {
View Full Code Here

Examples of org.caffinitas.mapper.annotations.CColumn

        ParseClass parseClass = model.entities.get(parseAttribute.attrType);
        if (parseClass == null) {
            parseClass = model.composites.get(parseAttribute.attrType);
        }

        CColumn column = parseAttribute.column;
        attributeOverrides = attributeOverrides.forPrefix(parseAttribute.attrName);
        attributeOverrides = attributeOverrides.merge(parseAttribute.attributeOverrides);
        columnNamePrefix = makeColumnName(attributeOverrides, nameMapper, columnNamePrefix, column);

        List<CqlColumn> myColumns = new ArrayList<CqlColumn>(allAttributes.length * 2);
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.