org.springframework.data.relational.core.mapping.Column Java Examples
The following examples show how to use
org.springframework.data.relational.core.mapping.Column.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomElementHandler.java From infobip-spring-data-querydsl with Apache License 2.0 | 5 votes |
private String getColumnName(Property property) { String name = nameWithoutPrefix(property.getDeclaringType().getPackageName(), property.getDeclaringType().getSimpleName()); TypeElement parentType = elements.getTypeElement(name); return parentType.getEnclosedElements() .stream() .filter(element -> element instanceof VariableElement) .map(element -> (VariableElement) element) .filter(element -> element.getSimpleName().toString().equals(property.getName())) .filter(element -> element.getAnnotation(Column.class) != null) .map(element -> element.getAnnotation(Column.class).value()) .findAny() .orElseGet(() -> CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, property.getName())); }
Example #2
Source File: LegoSet.java From spring-data-examples with Apache License 2.0 | 4 votes |
@Column("MIN_AGE") public int getIntMinimumAge() { return toInt(this.minimumAge); }
Example #3
Source File: LegoSet.java From spring-data-examples with Apache License 2.0 | 4 votes |
@Column("MAX_AGE") public int getIntMaximumAge() { return toInt(this.maximumAge); }