@Target(value={METHOD,PARAMETER,FIELD,TYPE}) @Retention(value=RUNTIME) public @interface ElementCollection
Ex1:
public class MyController{
@ElementCollection(bean="myElement", useMapping=true)
private Map<String,BeanConstructorTest> property;
...
}
Ex2:
public class MyController{
@ElementCollection(bean="myElement")
private List<Integer> property;
...
}
| Modifier and Type | Optional Element and Description |
|---|---|
Any |
any
Permite definir múltiplos tipos de elementos.
|
String |
bean
Nome da entidade.
|
EnumerationType |
enumerated
Usado em tipos
Enum. |
MappingTypes |
mappingType
Tipo do mapeamento da entidade.
|
String |
scope
Escopo da entidade.
|
Class<?> |
target
Classe alvo do mapeamento.
|
String |
temporal
|
Class<? extends org.brandao.brutos.type.Type> |
type
Define o uso de um tipo específico.
|
public abstract String bean
public abstract String scope
ScopeTypepublic abstract MappingTypes mappingType
MappingTypespublic abstract Class<?> target
public abstract EnumerationType enumerated
Enum. Os valores estão descritos em
EnumerationType.public abstract String temporal
public abstract Any any
public abstract Class<? extends org.brandao.brutos.type.Type> type
Copyright © 2018 Brandao. All rights reserved.