svn://www.sd.nl/LLBLGenPro/Templates/ManagerTemplatesAddOns/GlobalBuckets/Trunk
Global Buckets v1.0 (or something')
Author: Chris Martin
Date Submitted: 01-21-05
Synopsis:
Sometimes you have a need to have common filters globally available
in your project. With these templates you can easily implement that
functionality.
(crappy)Example:
public static MyEntity Fetch( int id )
{
RelationPredicateBucket filter =
BucketFactory.Create( MyEntityBucketType.Artist );
Fetch(id, filter);
}
Actually; if you’re interested in these templates just download them
and check them out. They are very straight forward.
Class Layout:
Managers
Buckets
BucketFactory (1)
*BucketType (0…n)
Predicates
*Predicate (0…n)
Relations
*Relation (0…n)
Notes:
All *BucketType files are enums. Each enum has a value of ‘None’
initially. You must define the *BucketType values as you need them.
When you define a *BucketType value, you must also define a
corresponding *Predicate and *Relation property with the same name.
Either or both of those properties may just return null if you’d like.
I’ve separated the predicates and relations into their own classes to
force consistency of the resulting code.
(I’m not 100% about this right now. Anyone have any thoughts?)