mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - code cleanup - remove unused validateCascade property
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
+1
-12
@@ -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()]);
|
||||
|
||||
Reference in New Issue
Block a user