Android Open Source - Ada-Framework-Maven Range Validation






From Project

Back to project page Ada-Framework-Maven.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project Ada-Framework-Maven listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
   Copyright Mob&Me 2012 (@MobAndMe)
//from  w ww  .  j  a  va  2  s . co  m
   Licensed under the LGPL Lesser General Public License, Version 3.0 (the "License"),  
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.gnu.org/licenses/lgpl.html

   Unless required by applicable law or agreed to in writing, software 
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   
   Website: http://adaframework.com
   Contact: Txus Ballesteros <txus.ballesteros@mobandme.com>
*/

package com.mobandme.ada.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.mobandme.ada.validators.RangeValidator;

/**
 * Annotation to define Required Field Validation.
 * @version 2.4.3
 * @author Mob&Me
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RangeValidation {

  /**
   * Define the minimum range value.
   * @return
   */
  public int minValue();
  
  /**
   * Define the maximum range value.
   * @return
   */
  public int maxValue();
  
  /**
   * Define the error message when the validation is not ok. 
   * @return
   */
  public String message() default "* Required Field.";
  
  /**
   * Define the error message resource string when the validation is not ok.
   * @return
   */
  public int messageResourceId() default 0;
  
  /**
   * Define the custom property getter suffix, Example: getXXXX() => getMySufix()
   * @return
   */
  public String getterSuffix() default "";
  
  /**
   * Define the custom property setter suffix, Example: setXXXX(Object pVar) => setMySufix(Object pVar)
   * @return
   */
  public String setterSuffix() default "";
  
  /**
   * Define the custom DataBinder Class.
   * @return
   */
  Class<?> validator() default RangeValidator.class;
}




Java Source Code List

com.mobandme.ada.BuildConfig.java
com.mobandme.ada.DataBaseHelper.java
com.mobandme.ada.DataBinder.java
com.mobandme.ada.DataBinding.java
com.mobandme.ada.DataIndex.java
com.mobandme.ada.DataMapping.java
com.mobandme.ada.DataParser.java
com.mobandme.ada.DataUtils.java
com.mobandme.ada.DatabaseMerger.java
com.mobandme.ada.EncryptionHelper.java
com.mobandme.ada.Entity.java
com.mobandme.ada.ExceptionsHelper.java
com.mobandme.ada.Manifest.java
com.mobandme.ada.ObjectContext.java
com.mobandme.ada.ObjectSet.java
com.mobandme.ada.ReflectionHelper.java
com.mobandme.ada.Validation.java
com.mobandme.ada.annotations.CustomValidation.java
com.mobandme.ada.annotations.Databinding.java
com.mobandme.ada.annotations.ObjectSetConfiguration.java
com.mobandme.ada.annotations.RangeValidation.java
com.mobandme.ada.annotations.RegularExpressionValidation.java
com.mobandme.ada.annotations.RequiredFieldValidation.java
com.mobandme.ada.annotations.TableField.java
com.mobandme.ada.annotations.TableIndex.java
com.mobandme.ada.annotations.TableIndexes.java
com.mobandme.ada.annotations.Table.java
com.mobandme.ada.exceptions.AdaFrameworkException.java
com.mobandme.ada.exceptions.InaccessibleFieldException.java
com.mobandme.ada.exceptions.InaccessibleObjectSetException.java
com.mobandme.ada.exceptions.ModelGenerationException.java
com.mobandme.ada.exceptions.PopulateObjectSetException.java
com.mobandme.ada.listeners.ObjectSetEventsListener.java
com.mobandme.ada.validators.ExpressionValidator.java
com.mobandme.ada.validators.RangeValidator.java
com.mobandme.ada.validators.RequiredValidator.java
com.mobandme.ada.validators.ValidationResult.java
com.mobandme.ada.validators.Validator.java