Examples of forRowExtraction()


Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forRowExtraction()

            entity = meta.forOperations().instanciate();
            for (Definition column : columnDefinitions) {
                String columnName = column.getName();
                PropertyMeta pm = propertiesMap.get(columnName);
                if (pm != null) {
                    Object value = pm.forRowExtraction().invokeOnRowForFields(row);
                    pm.forValues().setValueToField(entity, value);
                }
            }
            PropertyMeta idMeta = meta.getIdMeta();
            if (idMeta.structure().isEmbeddedId()) {
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forRowExtraction()

                    pm.forValues().setValueToField(entity, value);
                }
            }
            PropertyMeta idMeta = meta.getIdMeta();
            if (idMeta.structure().isEmbeddedId()) {
                Object compoundKey = idMeta.forRowExtraction().extractCompoundPrimaryKeyFromRow(row, meta, entityState);
                idMeta.forValues().setValueToField(entity, compoundKey);
            }
        }
        return entity;
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forRowExtraction()

        when(columnDefs.iterator()).thenReturn(asList(def1, def2).iterator());

        when(entityMeta.getIdMeta()).thenReturn(idMeta);
        when(entityMeta.forOperations().instanciate()).thenReturn(entity);
        when(idMeta.forRowExtraction().invokeOnRowForFields(row)).thenReturn(id);
        when(valueMeta.forRowExtraction().invokeOnRowForFields(row)).thenReturn("value");
        when(entityMeta.forOperations().instanciate()).thenReturn(entity);

        CompleteBean actual = entityMapper.mapRowToEntityWithPrimaryKey(entityMeta, row, propertiesMap, MANAGED);

        assertThat(actual).isSameAs(entity);
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMeta.forRowExtraction()

        when(row.getColumnDefinitions()).thenReturn(columnDefs);
        when(columnDefs.iterator()).thenReturn(Arrays.<Definition>asList().iterator());
        when(entityMeta.forOperations().instanciate()).thenReturn(entity);
        when(entityMeta.getIdMeta()).thenReturn(idMeta);
        when(idMeta.forRowExtraction().extractCompoundPrimaryKeyFromRow(row, entityMeta, MANAGED)).thenReturn(embeddedKey);

        ClusteredEntity actual = entityMapper.mapRowToEntityWithPrimaryKey(entityMeta, row, propertiesMap, MANAGED);

        assertThat(actual).isSameAs(entity);
        verify(idMeta.forValues()).setValueToField(entity, embeddedKey);
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.