There is, actually, a ServiceLayerDecorator there, but it doesn't do much--just a workaround for a DAO use case that's not fully supported otherwise.
http://code.google.com/p/listwidget/source/browse/trunk/src/main/java/com/listwidget/server/servlet/BugFixSLD.java?r=9 ServiceLayerDecorators are a hook to support advanced customization of RequestFactory like hooking in Spring as a "Locator locator," but are not required to use RequestFactory. Thanks for your questions--I'll make sure they're answered in the forthcoming docs. /dmc On Mon, Jan 10, 2011 at 4:31 PM, zixzigma <[email protected]> wrote: > Thank you David. > > I am looking forward to see even a tiny bit of code on how to use a > custom ServiceLayerDecorator. > I dont think there is a ServiceLayerDecorator here: > http://code.google.com/p/listwidget/source/browse/ > > and this particular Locator: > > http://code.google.com/p/listwidget/source/browse/trunk/src/main/java/com/listwidget/server/locator/ObjectifyLocator.java?r=9 > > 1- is it correct to assume this is a structure that is required only > to make RequestFactory work ? > > > for example: > > @Override > public Class<DatastoreObject> getDomainType() > { > // Never called > return null; > } > > @Override > public Long getId(DatastoreObject domainObject) > { > return domainObject.getId(); > } > > @Override > public Class<Long> getIdType() > { > return Long.class; > } > > @Override > public Object getVersion(DatastoreObject domainObject) > { > return domainObject.getVersion(); > } > > what is the purpose behind all these ? > > 2- is this a Bridge between our own Serverside code and > RequestFactory? > is this "The" place where we hand in our Entity to RF so it can > deliver to the client ? > is it correct to say that we only need "one" EntityLocator like > ObjectifyLocator for our entire app, > and this implementation will always be nearly the same for everyone > using RF ? > returning domainObject.getVersion, domainObject.getId, Long.class , > null ? > > 3- what benefit does ServiceLayerDecorator brings to the table ? > > 4- does RequestFactory expects that our Entities have a Version > assosiated with them, > or RF provides this version ? because with Objectify/GAE DataStore, > entities are not versioned. > in other words, if you sotre an entity in DataStore, the entity > version will always be null. [1] > so who sets this version ? > > [1] > DataStore/Objectify do not provide version , and it is always null ! > > http://groups.google.com/group/objectify-appengine/browse_thread/thread/c053fed4924d5815 > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- David Chandler Developer Programs Engineer, Google Web Toolkit w: http://code.google.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
