Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an official way in Active Object to set the minimum lenth of field in database table?

Hy Nguyen October 23, 2018

Hi all,

 

I have a class


public interface SchemeEntity extends Entity {

@NotNull
@StringLength(10)
String getName();

void setName(String name);

String getDescription();

void setDescription(String description);

@OneToMany(reverse = "getGraphicLanguageScheme")
WorkflowEntity[] getWorkflowGraphicEntries();

@OneToMany(reverse = "getGraphicLanguageScheme")
GraphicLanguageEntryEntity[] getGraphicLanguageEntries();
}

 Is there any OFFICIAL way to set the minimum length limit of some field, for example "name" in that entity class?

I'm expecting something like:

@   @NotNull
@StringLength(10)
@MinLenth(3)
String getName();

It means the length of "name " can be from 3 to 10.

0 answers

Suggest an answer

Log in or Sign up to answer