Hmmm... you know i like the idea of factory injection but pulling it off is usually not feasible. Also the validation is not in the builder but in the actual implementation classes themselves.
Jody Garnett wrote: > I am with you man; I just wish we could leave it on a while longer. Darn > projects starting up on trunk ;-) > > One good way to "switch" would be to have a strict factory and a normal > factory; and then use the usual global hints thing to choose. > > For this to work we would need to take the validation out of the builder > ... > Jody > >> Ahhh...my favorite debate, to validate or not to validate. >> >> First off, my opinion is that i think it is probably best to not >> validate unless the user / application asks for it. Like for the >> rendering case you probably want to be somewhat lax about the content in >> these cases. Where as for editing / transactions you want to be strict. >> >> However, while i made the feature model switch i left it on because it >> was a good way to catch cases where backward compatibility was being >> violated. >> >> So i would be ok with turning it off... we however need a good way for >> the user to ask for it. Currently the api has no validate method, >> although i think there is a utility method somewhere. >> >> Anyone else have any thoughts? >> >> -Justin >> >> Gabriel Roldán wrote: >> >>> Hi, >>> >>> I'm getting trapped by validation. Thing being that AttributeImpl >>> constructor calls Types.validate(this, getValue()), which fails to >>> validate, for example, a double value. >>> Example: >>> I've inserted a double attribute in sde with the value 0.7 >>> The attribute has a length "restriction" (aka, Filter) of 15. >>> Now, when I fetch the attribute from the database, it's >>> 0.700000000000001, hence the validation fails. >>> >>> Question is: >>> - does anybody got trapped in the same way? how to solve it? >>> - should I check the attribute content is valid before creating the >>> Attribute? >>> - should that kind of validation not occur at all when fetching data, >>> but just when inserting/modifying? >>> >>> hrmmm... >>> >>> Gabriel >>> >>> >>> >>> >>> >> >> >> > > > !DSPAM:4007,4745ad8b293161012714783! > -- Justin Deoliveira The Open Planning Project http://topp.openplans.org ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
