<s> '''<STR_LIT>''' <EOL> from sqlalchemy import Column , ForeignKey <EOL> from sqlalchemy . orm import synonym , relationship <EOL> from sqlalchemy . types import Unicode , Boolean , Integer <EOL> from models import dbsession <EOL> from models . BaseObject import BaseObject <EOL> class PluginDetails ( BaseObject ) : <EOL> name = Column ( Unicode ( <NUM_LIT:32> ) , nullable = False ) <EOL> author = Column ( Unicode ( <NUM_LIT:32> ) ) <EOL> website = Column ( Unicode ( <NUM_LIT> ) ) <EOL> version = Column ( Unicode ( <NUM_LIT:32> ) ) <EOL> description = Column ( Unicode ( <NUM_LIT> ) ) <EOL> copyright = Column ( Unicode ( <NUM_LIT:32> ) ) <EOL> precomputation = Column ( Boolean , nullable = False ) <EOL> algorithm_id = Column ( Integer , ForeignKey ( '<STR_LIT>' ) , nullable = False ) <EOL> @ classmethod <EOL> def by_id ( cls , pid ) : <EOL> '''<STR_LIT>''' <EOL> return dbsession . query ( cls ) . filter_by ( id = pid ) . first ( ) <EOL> @ classmethod <EOL> def by_uuid ( cls , puuid ) : <EOL> '''<STR_LIT>''' <EOL> return dbsession . query ( cls ) . filter_by ( uuid = unicode ( puuid ) ) . first ( ) <EOL> @ classmethod <EOL> def by_name ( cls , pname ) : <EOL> '''<STR_LIT>''' <EOL> return dbsession . query ( cls ) . filter_by ( name = unicode ( pname ) ) . first ( ) <EOL> @ classmethod <EOL> def get_all ( cls ) : <EOL> '''<STR_LIT>''' <EOL> return dbsession . query ( cls ) . all ( ) <EOL> @ classmethod <EOL> def get_precomputation_plugins ( cls ) : <EOL> '''<STR_LIT>''' <EOL> return dbsession . query ( cls ) . filter_by ( precomputation = True ) . all ( ) <EOL> @ classmethod <EOL> def get_computation_plugins ( cls ) : <EOL> '''<STR_LIT>''' <EOL> return dbsession . query ( cls ) . filter_by ( precomputation = False ) . all ( ) </s>
