NEW! Global Buckets Temlpates

Posts   
 
    
cmartinbot
User
Posts: 147
Joined: 08-Jan-2004
# Posted on: 22-Jan-2005 01:16:28   
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?)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Jan-2005 09:56:18   

Great stuff, Chris!! smile

Frans Bouma | Lead developer LLBLGen Pro
Devildog74
User
Posts: 719
Joined: 04-Feb-2004
# Posted on: 24-Jan-2005 22:41:00   

Wow, by the time I finish my functional specification for my application I am scoping, youre going to have all the LPT templates that I ever wanted. I gonna have to put you on the payroll. simple_smile

You rock,

cmartinbot
User
Posts: 147
Joined: 08-Jan-2004
# Posted on: 24-Jan-2005 23:44:55   

Devildog74 wrote:

I gonna have to put you on the payroll. simple_smile

You rock,

Please do simple_smile I'm out of a job currently rage