net.sf.ofx4j.io
Class AggregateInfo

java.lang.Object
  extended by net.sf.ofx4j.io.AggregateInfo

public class AggregateInfo
extends java.lang.Object

Holder for meta information about an aggregate class.

Author:
Ryan Heaton

Method Summary
 AggregateAttribute getAttribute(java.lang.String name, int orderHint)
          Get the attribute by the specified name.
 java.util.SortedSet<AggregateAttribute> getAttributes()
          The attributes.
 java.util.Map<java.lang.String,java.lang.Object> getHeaders(java.lang.Object instance)
          Get the headers defined by the specific aggregate instance.
 java.lang.Class getHeaderType(java.lang.String name)
          The type of the specified header.
 java.lang.String getName()
          The name of the aggregate.
 boolean hasHeaders()
          Whether this aggregate has headers.
 void setHeader(java.lang.Object instance, java.lang.String name, java.lang.Object value)
          Set the header value for the specified instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
The name of the aggregate.

Returns:
The name of the aggregate.

getAttributes

public java.util.SortedSet<AggregateAttribute> getAttributes()
The attributes.

Returns:
The attributes.

getAttribute

public AggregateAttribute getAttribute(java.lang.String name,
                                       int orderHint)
Get the attribute by the specified name.

Parameters:
name - The name of the attribute.
orderHint - The order at which the attribute should come after in case there are more than one candidates.
Returns:
The attribute by the specified name, or if there are more than one by that name, the first one after the specified order, or if there are none then the first collection that comes after the order hint, or the latest if there are none that come after the order hint, or null.

hasHeaders

public boolean hasHeaders()
Whether this aggregate has headers.

Returns:
Whether this aggregate has headers.

getHeaders

public java.util.Map<java.lang.String,java.lang.Object> getHeaders(java.lang.Object instance)
Get the headers defined by the specific aggregate instance.

Parameters:
instance - The aggregate instance.
Returns:
The headers.

getHeaderType

public java.lang.Class getHeaderType(java.lang.String name)
The type of the specified header.

Parameters:
name - The header name.
Returns:
The header type, or null if no header by the specified name exists.

setHeader

public void setHeader(java.lang.Object instance,
                      java.lang.String name,
                      java.lang.Object value)
Set the header value for the specified instance.

Parameters:
instance - The instance.
name - The name of the header.
value - the value of the header.


Copyright © 2008. All Rights Reserved.