Examples of extractCompoundPrimaryKeyFromRow()


Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMetaRowExtractor.extractCompoundPrimaryKeyFromRow()

    public void setPropertyToEntity(Row row, EntityMeta meta,PropertyMeta pm, Object entity) {
        log.debug("Set property {} value from fetched CQL row", pm.getPropertyName());
        if (row != null) {
            final PropertyMetaRowExtractor rowExtractor = pm.forRowExtraction();
            if (pm.structure().isEmbeddedId()) {
                Object compoundKey = rowExtractor.extractCompoundPrimaryKeyFromRow(row, meta, MANAGED);
                pm.forValues().setValueToField(entity, compoundKey);
            } else {
                Object value = rowExtractor.invokeOnRowForFields(row);
                pm.forValues().setValueToField(entity, value);
            }
View Full Code Here

Examples of info.archinnov.achilles.internal.metadata.holder.PropertyMetaRowExtractor.extractCompoundPrimaryKeyFromRow()

        //Given
        EmbeddedKey embeddedKey = new EmbeddedKey();
        PropertyMetaRowExtractor rowExtractor = mock(PropertyMetaRowExtractor.class);
        when(pm.forRowExtraction()).thenReturn(rowExtractor);
        when(pm.structure().isEmbeddedId()).thenReturn(true);
        when(rowExtractor.extractCompoundPrimaryKeyFromRow(row, entityMeta, MANAGED)).thenReturn(embeddedKey);

        //When
        entityMapper.setPropertyToEntity(row, entityMeta, pm, entity);

        //Then
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.