Examples of doWithProperties()


Examples of org.springframework.data.mapping.PersistentEntity.doWithProperties()

    @Override
    protected void onAfterDelete(final Object entity) {
        PersistentEntity persistentEntity = persistentEntityFor(entity.getClass());

        persistentEntity.doWithProperties(new PersistentPropertyFileDeletionHandler(entity));
    }

    private class PersistentPropertyFileDeletionHandler extends FileReferencePropertyHandler {
        private final Object entity;
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity.doWithProperties()

    @Override
    protected void onBeforeSave(Object entity) {
        PersistentEntity persistentEntity = persistentEntityFor(entity.getClass());

        NotEmptyFileReferencePropertiesCollector propertyValueCollector = new NotEmptyFileReferencePropertiesCollector(entity);
        persistentEntity.doWithProperties(propertyValueCollector);

        FileReferenceProperties fileReferenceProperties = propertyValueCollector.getFilePropertyValues();

        persistentEntity.doWithProperties(new FileReferencePropertiesValueEraser(entity, fileReferenceProperties));
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity.doWithProperties()

        NotEmptyFileReferencePropertiesCollector propertyValueCollector = new NotEmptyFileReferencePropertiesCollector(entity);
        persistentEntity.doWithProperties(propertyValueCollector);

        FileReferenceProperties fileReferenceProperties = propertyValueCollector.getFilePropertyValues();

        persistentEntity.doWithProperties(new FileReferencePropertiesValueEraser(entity, fileReferenceProperties));

        fileReferencePropertiesContext.set(fileReferenceProperties);
    }

    @Override
View Full Code Here

Examples of org.springframework.data.mapping.PersistentEntity.doWithProperties()

        PersistentEntity persistentEntity = persistentEntityFor(entity.getClass());
        DynamicJpaRepository repository = repositoryFor(entity.getClass());

        FileReferenceProperties fileReferenceProperties = fileReferencePropertiesContext.get();
        try {
            persistentEntity.doWithProperties(new FileReferencePropertiesSaveHandler(entity, fileReferenceProperties));

            repository.save(entity);
        } finally {
            fileReferencePropertiesContext.remove();
        }
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.