Here are the examples of the java api org.grails.datastore.mapping.model.types.Embedded.getType() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
13
View Complete Implementation : ClosureEventTriggeringInterceptor.java
Copyright Apache License 2.0
Author : grails
Copyright Apache License 2.0
Author : grails
private void activateDirtyChecking(Object enreplacedy) {
if (enreplacedy instanceof DirtyCheckable && proxyHandler.isInitialized(enreplacedy)) {
PersistentEnreplacedy persistentEnreplacedy = mappingContext.getPersistentEnreplacedy(Hibernate.getClreplaced(enreplacedy).getName());
enreplacedy = proxyHandler.unwrap(enreplacedy);
DirtyCheckable dirtyCheckable = (DirtyCheckable) enreplacedy;
Map<String, Object> dirtyCheckingState = persistentEnreplacedy.getReflector().getDirtyCheckingState(enreplacedy);
if (dirtyCheckingState == null) {
dirtyCheckable.trackChanges();
for (Embedded replacedociation : persistentEnreplacedy.getEmbedded()) {
if (DirtyCheckable.clreplaced.isreplacedignableFrom(replacedociation.getType())) {
Object embedded = replacedociation.getReader().read(enreplacedy);
if (embedded != null) {
DirtyCheckable embeddedCheck = (DirtyCheckable) embedded;
if (embeddedCheck.listDirtyPropertyNames().isEmpty()) {
embeddedCheck.trackChanges();
}
}
}
}
}
}
}