io.ebeaninternal.server.core.DefaultBeanState Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.core;
import io.ebean.BeanState;
import io.ebean.ValuePair;
import io.ebean.bean.EntityBean;
import io.ebean.bean.EntityBeanIntercept;
import java.util.Map;
import java.util.Set;
/**
* Default implementation of BeanState.
*/
public class DefaultBeanState implements BeanState {
private final EntityBeanIntercept intercept;
public DefaultBeanState(EntityBean entityBean) {
this.intercept = entityBean._ebean_getIntercept();
}
@Override
public void setPropertyLoaded(String propertyName, boolean loaded) {
intercept.setPropertyLoaded(propertyName, loaded);
}
@Override
public boolean isReference() {
return intercept.isReference();
}
@Override
public boolean isNew() {
return intercept.isNew();
}
@Override
public boolean isNewOrDirty() {
return intercept.isNewOrDirty();
}
@Override
public boolean isDirty() {
return intercept.isDirty();
}
@Override
public Set getLoadedProps() {
return intercept.getLoadedPropertyNames();
}
@Override
public Set getChangedProps() {
return intercept.getDirtyPropertyNames();
}
@Override
public Map getDirtyValues() {
return intercept.getDirtyValues();
}
@Override
public boolean isReadOnly() {
return intercept.isReadOnly();
}
@Override
public void setReadOnly(boolean readOnly) {
intercept.setReadOnly(readOnly);
}
@Override
public void setLoaded() {
intercept.setLoaded();
}
@Override
public void setDisableLazyLoad(boolean disableLazyLoading) {
intercept.setDisableLazyLoad(disableLazyLoading);
}
@Override
public boolean isDisableLazyLoad() {
return intercept.isDisableLazyLoad();
}
@Override
public void resetForInsert() {
intercept.setNew();
}
@Override
public Map getLoadErrors() {
return intercept.getLoadErrors();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy