mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
Remove Validation and LDAP features
This commit is contained in:
1 parent
fb28c641d0
commit
9f624ec2bf
27 files changed
+132
-609
No files matched your search
@@ -3,10 +3,7 @@ package com.avaje.ebeaninternal.server.deploy.meta;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Types;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.persistence.EmbeddedId;
|
||||
@@ -19,7 +16,6 @@ import com.avaje.ebean.annotation.UpdatedTimestamp;
|
||||
import com.avaje.ebean.config.ScalarTypeConverter;
|
||||
import com.avaje.ebean.config.dbplatform.DbEncrypt;
|
||||
import com.avaje.ebean.config.dbplatform.DbEncryptFunction;
|
||||
import com.avaje.ebean.validation.factory.Validator;
|
||||
import com.avaje.ebeaninternal.server.core.InternString;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor.EntityType;
|
||||
import com.avaje.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty;
|
||||
@@ -211,8 +207,6 @@ public class DeployBeanProperty {
|
||||
*/
|
||||
private GeneratedProperty generatedProperty;
|
||||
|
||||
private List<Validator> validators = new ArrayList<Validator>();
|
||||
|
||||
private final DeployBeanDescriptor<?> desc;
|
||||
|
||||
private boolean undirectionalShadow;
|
||||
@@ -404,39 +398,6 @@ public class DeployBeanProperty {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a validator to this property.
|
||||
*/
|
||||
public void addValidator(Validator validator) {
|
||||
validators.add(validator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the property contains a validator of a given type.
|
||||
* <p>
|
||||
* Used to detect if a validator has already been assigned when trying to
|
||||
* automatically add validators such as Length and NotNull.
|
||||
* </p>
|
||||
*/
|
||||
public boolean containsValidatorType(Class<?> type) {
|
||||
|
||||
Iterator<Validator> it = validators.iterator();
|
||||
while (it.hasNext()) {
|
||||
Validator validator = (Validator) it.next();
|
||||
if (validator.getClass().equals(type)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the validators for this property.
|
||||
*/
|
||||
public Validator[] getValidators() {
|
||||
return validators.toArray(new Validator[validators.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the scalarType. This returns null for native JDBC types, otherwise
|
||||
* it is used to convert between logical types and jdbc types.
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.avaje.ebean.bean.BeanCollection.ModifyListenMode;
|
||||
import com.avaje.ebean.validation.factory.Validator;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanDescriptorMap;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanProperty;
|
||||
@@ -157,23 +156,6 @@ public class DeployBeanPropertyLists {
|
||||
return derivedFirstVersionProp;
|
||||
}
|
||||
|
||||
public BeanProperty[] getPropertiesWithValidators(boolean recurse) {
|
||||
|
||||
ArrayList<BeanProperty> list = new ArrayList<BeanProperty>();
|
||||
Iterator<BeanProperty> it = propertyMap.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
BeanProperty property = (BeanProperty) it.next();
|
||||
if (property.hasValidationRules(recurse)) {
|
||||
list.add(property);
|
||||
}
|
||||
}
|
||||
return list.toArray(new BeanProperty[list.size()]);
|
||||
}
|
||||
|
||||
public Validator[] getBeanValidators() {
|
||||
return new Validator[0];
|
||||
}
|
||||
|
||||
public LinkedHashMap<String, BeanProperty> getPropertyMap() {
|
||||
return propertyMap;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user