[Stoq-devel] [Bug 2479] - Infra-estrutura de suporte a interfaces e adapters deve suportar multiplos tipos de adapter para uma mesma interface

bugzilla-daemon at async.com.br bugzilla-daemon at async.com.br
Thu Sep 14 10:04:04 BRT 2006


http://bugs.async.com.br/show_bug.cgi?id=2479  


Johan Dahlin <jdahlin at async.com.br> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jdahlin at async.com.br




--- Comment #2 from Johan Dahlin <jdahlin at async.com.br>  2006-09-14 10:04 BRT ---
I talked to kiko about this, to solve this we basically need to add a lot of
base classes, similar to AbstractSellable and AbstractStorable which we have
today.
getAdaptorClass needs to die aswell, because it ties to a specific
implementation. 

"Abstract" is a bad name, I'd prefer using a single letter to mark a base
class.
I is already taken by interface, so A (as in abstract), B (as in base) or C (as
in common) could be used.

It's a major task to solve this, a plan could be;

* Make all adaptors private
* Introduce base classes for all interfaces which are used as facets
* Remove getAdaptorClass

  table = Person.getAdapterClass(IUser)
  table.query(table.q.username == username)

will be replaced by a query on the abstract/base interface:

  BUser.query(BUser.q.username == username)


More information about the Stoq-devel mailing list