Package oracle.kv.table

Examples of oracle.kv.table.Row


    protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders)
    {
        KunderaCoreUtils.printQuery(
                "Persist data into " + entityMetadata.getSchema() + "." + entityMetadata.getTableName() + " for " + id,
                showQuery);
        Row row = createRow(entityMetadata, entity, id, rlHolders);
        // TODO:: handle case for putDate??????

        tableAPI.put(row, null, null);
    }
View Full Code Here


        String invJoinColumnName = joinTableData.getInverseJoinColumnName();
        Map<Key, List<TableOperation>> operations = new HashMap<Key, List<TableOperation>>();

        // String schema = joinTableData.getSchemaName();
        Table schemaTable = tableAPI.getTable(joinTableName);
        Row row = schemaTable.createRow();
        String primaryKey = joinColumnName + SEPERATOR + invJoinColumnName;
        KunderaCoreUtils.printQuery("Persist Join Table:" + joinTableName, showQuery);
        Map<Object, Set<Object>> joinTableRecords = joinTableData.getJoinTableRecords();

        try
View Full Code Here

                + " where value:" + pKeyColumnValue, showQuery);
        Iterator<Row> rowsIter = tableAPI.tableIterator(indexKey, null, null);

        while (rowsIter.hasNext())
        {
            Row row = rowsIter.next();
            FieldDef fieldMetadata = schemaTable.getField(columnName);
            FieldValue value = row.get(columnName);
            foreignKeys.add((E) NoSqlDBUtils.get(fieldMetadata, value, null));
        }

        return foreignKeys;
View Full Code Here

                            node.getDataClass());
                    List<RelationHolder> relationHolders = getRelationHolders(node);
                    // KunderaCoreUtils.showQuery("Execute batch for" +
                    // metadata.getSchema() + "." + metadata.getTableName(),
                    // showQuery);
                    Row row = createRow(metadata, node.getData(), node.getEntityId(), relationHolders);

                    Table schemaTable = tableAPI.getTable(metadata.getTableName());

                    addOps(operations, schemaTable, row);
                }
View Full Code Here

        while (rowsIter.hasNext())
        {
            relationMap = new HashMap<String, Object>();
            entity = initializeEntity(key, entityMetadata);

            Row row = rowsIter.next();

            List<String> fields = row.getTable().getFields();
            FieldDef fieldMetadata = null;
            FieldValue value = null;
            String idColumnName = ((AbstractAttribute) entityMetadata.getIdAttribute()).getJPAColumnName();
            if (/* eligibleToFetch(columnsToSelect, idColumnName) && */!metaModel.isEmbeddable(entityMetadata
                    .getIdAttribute().getBindableJavaType()))
            {
                populateId(entityMetadata, schemaTable, entity, row);
            }
            else
            {
                onEmbeddableId(entityMetadata, metaModel, schemaTable, entity, row);
            }

            Iterator<String> fieldIter = fields.iterator();

            Set<Attribute> attributes = entityType.getAttributes();
            for (Attribute attribute : attributes)
            {
                String jpaColumnName = ((AbstractAttribute) attribute).getJPAColumnName();
                if (eligibleToFetch(columnsToSelect, jpaColumnName)
                        && !attribute.getName().equals(entityMetadata.getIdAttribute().getName()))
                {
                    if (metaModel.isEmbeddable(((AbstractAttribute) attribute).getBindableJavaType()))
                    {
                        // readEmbeddable(value, columnsToSelect,
                        // entityMetadata, metaModel, schemaTable, value,
                        // attribute);
                        EmbeddableType embeddableId = metaModel.embeddable(((AbstractAttribute) attribute)
                                .getBindableJavaType());
                        Set<Attribute> embeddedAttributes = embeddableId.getAttributes();
                        Object embeddedObject = ((AbstractAttribute) attribute).getBindableJavaType().newInstance();
                        for (Attribute embeddedAttrib : embeddedAttributes)
                        {
                            String embeddedColumnName = ((AbstractAttribute) embeddedAttrib).getJPAColumnName();

                            fieldMetadata = schemaTable.getField(embeddedColumnName);
                            value = row.get(embeddedColumnName);
                            NoSqlDBUtils.get(fieldMetadata, value, embeddedObject,
                                    (Field) embeddedAttrib.getJavaMember());
                        }
                        PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), embeddedObject);

                    }
                    else
                    {
                        fieldMetadata = schemaTable.getField(jpaColumnName);
                        value = row.get(jpaColumnName);

                        if (!attribute.isAssociation() && value != null)
                        {
                            NoSqlDBUtils.get(fieldMetadata, value, entity, (Field) attribute.getJavaMember());
                        }
View Full Code Here

        MetamodelImpl metamodel = (MetamodelImpl) KunderaMetadataManager.getMetamodel(kunderaMetadata,
                entityMetadata.getPersistenceUnit());

        Table schemaTable = tableAPI.getTable(table);

        Row row = schemaTable.createRow();

        if (log.isDebugEnabled())
        {
            log.debug("Persisting data into " + schema + "." + table + " for " + id);
        }
View Full Code Here

TOP

Related Classes of oracle.kv.table.Row

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.