Initial commit from SVN.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.foundation.aggregatecollection.test;
|
||||
|
||||
import com.foundation.metadata.Attribute;
|
||||
import com.foundation.util.IManagedList;
|
||||
import com.foundation.util.ManagedList;
|
||||
|
||||
/**
|
||||
* Copyright Declarative Engineering LLC 2006<p>
|
||||
*/
|
||||
public class Foo extends AbstractModel {
|
||||
public static final Attribute BARS = registerCollection(Foo.class, "bars", AO_REFERENCED | AO_LAZY);
|
||||
/**
|
||||
* Foo constructor.
|
||||
*/
|
||||
public Foo() {
|
||||
}//Foo()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.foundation.common.Entity#lazyLoadAttribute(com.foundation.metadata.Attribute)
|
||||
*/
|
||||
protected Object lazyLoadAttribute(Attribute attribute) {
|
||||
Object result = null;
|
||||
|
||||
if(attribute == BARS) {
|
||||
result = new ManagedList(10, 20);
|
||||
}//if//
|
||||
else {
|
||||
result = super.lazyLoadAttribute(attribute);
|
||||
}//else//
|
||||
|
||||
return result;
|
||||
}//lazyLoadAttribute()//
|
||||
/**
|
||||
* Gets the bars value.
|
||||
* @return The bars value.
|
||||
*/
|
||||
public IManagedList getBars() {
|
||||
return (IManagedList) getAttributeValue(BARS);
|
||||
}//getBars()//
|
||||
}//Foo//
|
||||
Reference in New Issue
Block a user