@Bean(typeName="item", properties="name,type,length") public class Column extends Object
When serialized to XML, creates the following construct:
Constructor and Description |
---|
Column()
Bean constructor.
|
Column(String name,
String type)
Constructor.
|
Column(String name,
String type,
Integer length)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Column |
addPojoSwap(PojoSwap pojoSwap)
Associates a POJO swap with this column.
|
Integer |
getLength()
Bean property getter:
|
String |
getName()
Bean property getter:
|
String |
getType()
Bean property getter:
|
Column |
setLength(Integer length)
Bean property setter:
|
Column |
setName(String name)
Bean property setter:
|
Column |
setType(String type)
Bean property setter:
|
public Column()
public Column(String name, String type)
name
- The column name.type
- The column type (e.g. public Column addPojoSwap(PojoSwap pojoSwap)
Typically used to define columns that don't exist on the underlying beans being serialized.
For example, the AddressBookResource
sample defined the following POJO swap to define an additional
Column c =
pojoSwap
- The POJO swap to associate with the column.@Xml(format=ATTR) public String getName()
public Column setName(String name)
name
- The new value for the @Xml(format=ATTR) public String getType()
public Column setType(String type)
type
- The new value for the @Xml(format=ATTR) public Integer getLength()
Copyright © 2018 Apache. All rights reserved.