类javax.persistence.EnumType源码实例Demo

下面列出了怎么用javax.persistence.EnumType的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: o2oa   文件: CheckCore.java
public static void checkEnum(List<Class<?>> classes) throws Exception {
	for (Class<?> cls : classes) {
		List<Field> fields = FieldUtils.getFieldsListWithAnnotation(cls, FieldDescribe.class);
		for (Field field : fields) {
			if (field.getType().isEnum()) {
				Enumerated enumerated = field.getAnnotation(Enumerated.class);
				Column column = field.getAnnotation(Column.class);
				if (null == enumerated || (!Objects.equals(EnumType.STRING, enumerated.value())) || (null == column)
						|| column.length() > 200) {
					System.err.println(String.format("checkEnum error: class: %s, field: %s.", cls.getName(),
							field.getName()));
				}
			}
		}
	}
}
 
源代码2 项目: projectforge-webapp   文件: TaskDO.java
/** -&gt; Gantt */
@Deprecated
@Enumerated(EnumType.STRING)
@Column(name = "gantt_rel_type", length = 15)
public GanttRelationType getGanttRelationType()
{
  return ganttRelationType;
}
 
源代码3 项目: lams   文件: JPAOverriddenAnnotationReader.java
/**
 * Adds a @MapKeyEnumerated annotation to the specified annotationList if the specified element
 * contains a map-key-enumerated sub-element. This should only be the case for
 * element-collection, many-to-many, or one-to-many associations.
 */
private void getMapKeyEnumerated(List<Annotation> annotationList, Element element) {
	Element subelement = element != null ? element.element( "map-key-enumerated" ) : null;
	if ( subelement != null ) {
		AnnotationDescriptor ad = new AnnotationDescriptor( MapKeyEnumerated.class );
		EnumType value = EnumType.valueOf( subelement.getTextTrim() );
		ad.setValue( "value", value );
		annotationList.add( AnnotationFactory.create( ad ) );
	}
}
 
源代码4 项目: projectforge-webapp   文件: TeamEventAttendeeDO.java
/**
 * @return the status
 */
@Enumerated(EnumType.STRING)
@Column(length = 100)
public TeamAttendeeStatus getStatus()
{
  return status;
}
 
源代码5 项目: cia   文件: AssignmentElement.java
/**
* Gets the org code.
*
* @return the org code
*/
  @Basic
  @Column(name = "ORG_CODE")
  @Enumerated(EnumType.STRING)
  public OrgCode getOrgCode() {
      return orgCode;
  }
 
源代码6 项目: projectforge-webapp   文件: KontoDO.java
/**
 * @return the status
 */
@Enumerated(EnumType.STRING)
@Column(length = 10)
public KontoStatus getStatus()
{
  return status;
}
 
源代码7 项目: website   文件: User.java
@ElementCollection(targetClass = Role.class, fetch = FetchType.EAGER)
@CollectionTable(name = "USER_ROLES", joinColumns = @JoinColumn(name = "USER_ID"))
@Enumerated(EnumType.STRING)
@Column(name = "role", nullable = false)
public Set<Role> getRoles() {
	return roles;
}
 
源代码8 项目: cia   文件: VoteDataDto.java
/**
* Gets the vote.
*
* @return the vote
*/
  @Basic
  @Column(name = "VOTE")
  @Enumerated(EnumType.STRING)
  public VoteDecision getVote() {
      return vote;
  }
 
源代码9 项目: cia   文件: VoteDataDto.java
/**
* Gets the ballot type.
*
* @return the ballot type
*/
  @Basic
  @Column(name = "BALLOT_TYPE")
  @Enumerated(EnumType.STRING)
  public BallotType getBallotType() {
      return ballotType;
  }
 
源代码10 项目: cia   文件: VoteData.java
/**
* Gets the vote.
*
* @return the vote
*/
  @Basic
  @Column(name = "VOTE")
  @Enumerated(EnumType.STRING)
  public VoteDecision getVote() {
      return vote;
  }
 
源代码11 项目: cia   文件: VoteDataEmbeddedId.java
/**
* Gets the concern.
*
* @return the concern
*/
  @Basic
  @Column(name = "CONCERN")
  @Enumerated(EnumType.STRING)
  public VoteIssueType getConcern() {
      return concern;
  }
 
源代码12 项目: projectforge-webapp   文件: TaskDO.java
@Enumerated(EnumType.STRING)
@Column(name = "timesheet_booking_status", length = 20, nullable = false)
public TimesheetBookingStatus getTimesheetBookingStatus()
{
  if (timesheetBookingStatus == null) {
    return TimesheetBookingStatus.DEFAULT;
  } else {
    return timesheetBookingStatus;
  }
}
 
源代码13 项目: cia   文件: Region.java
/**
* Gets the value.
*
* @return the value
*/
  @Basic
  @Column(name = "VALUE_")
  @Enumerated(EnumType.STRING)
  public RegionCategory getValue() {
      return value;
  }
 
源代码14 项目: cia   文件: LendingType.java
/**
* Gets the value.
*
* @return the value
*/
  @Basic
  @Column(name = "VALUE_")
  @Enumerated(EnumType.STRING)
  public LendingTypeCategory getValue() {
      return value;
  }
 
源代码15 项目: cia   文件: PersonData.java
/**
* Gets the gender.
*
* @return the gender
*/
  @Basic
  @Column(name = "GENDER")
  @Enumerated(EnumType.STRING)
  public SexType getGender() {
      return gender;
  }
 
源代码16 项目: cia   文件: DocumentPersonReferenceData.java
/**
* Gets the role description.
*
* @return the role description
*/
  @Basic
  @Column(name = "ROLE_DESCRIPTION")
  @Enumerated(EnumType.STRING)
  public DocumentPersonReferenceRoleType getRoleDescription() {
      return roleDescription;
  }
 
源代码17 项目: projectforge-webapp   文件: TeamEventDO.java
/**
 * Gets type of event action. AUDIO or DISPLAY
 * 
 * @return the reminderType
 */
@Enumerated(EnumType.STRING)
@Column(name = "reminder_action_type")
public ReminderActionType getReminderActionType()
{
  return reminderActionType;
}
 
源代码18 项目: projectforge-webapp   文件: PostausgangDO.java
@Enumerated(EnumType.STRING)
@Column(name = "post_type", length = 100, nullable = false)
public PostType getType()
{
  return type;
}
 
源代码19 项目: uyuni   文件: ProjectSource.java
/**
 * Gets the state.
 *
 * @return state
 */
@Enumerated(EnumType.STRING)
@Column
public State getState() {
    return state;
}
 
源代码20 项目: uyuni   文件: FilterCriteria.java
/**
 * Gets the type.
 *
 * @return type
 */
@Column(name = "matcher")
@Enumerated(EnumType.STRING)
public Matcher getMatcher() {
    return matcher;
}
 
源代码21 项目: website   文件: PublisherPaymentDetails.java
@Column(nullable = false)
@Enumerated(EnumType.STRING)
public PaymentMethod getPaymentMethod() {
	return paymentMethod;
}
 
源代码22 项目: projectforge-webapp   文件: ContactEntryDO.java
@Enumerated(EnumType.STRING)
@Column(length = 15, name = "contact_type", nullable = false)
public ContactType getContactType()
{
  return contactType;
}
 
源代码23 项目: projectforge-webapp   文件: TaskDO.java
@Enumerated(EnumType.STRING)
@Column(length = STATUS_LENGTH)
public TaskStatus getStatus()
{
  return status;
}
 
源代码24 项目: projectforge-webapp   文件: AuftragsPositionDO.java
@Enumerated(EnumType.STRING)
@Column(name = "art", length = 30)
public AuftragsPositionsArt getArt()
{
  return art;
}
 
源代码25 项目: projectforge-webapp   文件: BookDO.java
@Enumerated(EnumType.STRING)
@Column(name = "book_type", length = 20, nullable = true)
public BookType getType()
{
  return type;
}
 
源代码26 项目: projectforge-webapp   文件: AuftragDO.java
@Enumerated(EnumType.STRING)
@Column(name = "status", length = 30)
public AuftragsStatus getAuftragsStatus()
{
  return auftragsStatus;
}
 
源代码27 项目: ponto-inteligente-api   文件: Funcionario.java
@Enumerated(EnumType.STRING)
@Column(name = "perfil", nullable = false)
public PerfilEnum getPerfil() {
	return perfil;
}
 
源代码28 项目: mycore   文件: MCRUser.java
/**
 * @return the hashType
 */
@Column(name = "hashType", nullable = true)
@Enumerated(EnumType.STRING)
public MCRPasswordHashType getHashType() {
    return password == null ? null : password.hashType;
}
 
源代码29 项目: projectforge-webapp   文件: AddressDO.java
@Enumerated(EnumType.STRING)
@Column(name = "form", length = 10)
public FormOfAddress getForm()
{
  return form;
}
 
源代码30 项目: projectforge-webapp   文件: ScriptDO.java
@Enumerated(EnumType.STRING)
@Column(length = 20)
public ScriptParameterType getParameter6Type()
{
  return parameter6Type;
}
 
 类所在包
 类方法
 同包方法