No effective change - code cleanup - remove unused validateCascade property

This commit is contained in:
Robin Bygrave
2015-07-31 21:38:05 +12:00
parent 4807ca32be
commit c0fc7d69a6
4 changed files with 2 additions and 45 deletions
@@ -19,12 +19,7 @@ public class BeanCascadeInfo {
* Should save cascade.
*/
boolean save;
/**
* Should validate cascade.
*/
boolean validate;
/**
* Set the raw deployment attribute.
*/
@@ -43,14 +38,10 @@ public class BeanCascadeInfo {
// same as EJB3 persist
save = (attr.contains("persist"));
}
if (attr.contains("validate")){
validate = true;
}
if (attr.contains("all")){
delete = true;
save = true;
validate = true;
}
}
@@ -74,9 +65,6 @@ public class BeanCascadeInfo {
if (type.equals(CascadeType.MERGE)){
save = true;
}
if (save || delete){
validate = true;
}
}
/**
@@ -105,18 +93,4 @@ public class BeanCascadeInfo {
this.save = isUpdate;
}
/**
* Return true if validate should be cascaded.
*/
public boolean isValidate() {
return validate;
}
/**
* Set validate to cascade or not.
*/
public void setValidate(boolean isValidate) {
this.validate = isValidate;
}
}
@@ -7,7 +7,6 @@ import com.avaje.ebean.config.dbplatform.DbType;
import com.avaje.ebean.text.StringFormatter;
import com.avaje.ebean.text.StringParser;
import com.avaje.ebeaninternal.server.core.InternString;
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor.EntityType;
import com.avaje.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty;
import com.avaje.ebeaninternal.server.deploy.meta.DeployBeanProperty;
import com.avaje.ebeaninternal.server.el.ElPropertyChainBuilder;
@@ -33,7 +32,6 @@ import java.lang.reflect.Field;
import java.sql.SQLException;
import java.sql.Types;
import java.util.List;
import java.util.Map;
/**
* Description of a property of a bean. Includes its deployment information such
@@ -193,8 +191,6 @@ public class BeanProperty implements ElPropertyValue {
@SuppressWarnings("rawtypes")
final ScalarType scalarType;
boolean cascadeValidate;
/**
* The length or precision for DB column.
*/
@@ -101,8 +101,6 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty {
saveRecurseSkippable = targetDescriptor.isSaveRecurseSkippable();
deleteRecurseSkippable = targetDescriptor.isDeleteRecurseSkippable();
cascadeValidate = cascadeInfo.isValidate();
if (!targetIdBinder.isComplexId()){
targetIdProperty = targetIdBinder.getIdProperty();
}
@@ -283,7 +283,7 @@ public class DeployBeanPropertyLists {
* Mode used to determine which BeanPropertyAssoc to include.
*/
private enum Mode {
Save, Delete, Validate
Save, Delete
}
private BeanPropertyAssocOne<?>[] getOne(boolean imported, Mode mode) {
@@ -302,11 +302,6 @@ public class DeployBeanPropertyLists {
list.add(prop);
}
break;
case Validate:
if (prop.getCascadeInfo().isValidate()) {
list.add(prop);
}
break;
default:
break;
}
@@ -349,15 +344,9 @@ public class DeployBeanPropertyLists {
list.add(prop);
}
break;
case Validate:
if (prop.getCascadeInfo().isValidate()) {
list.add(prop);
}
break;
default:
break;
}
}
return (BeanPropertyAssocMany[]) list.toArray(new BeanPropertyAssocMany[list.size()]);