Changeset 8295 for mauRepo/MolesManager/trunk/src/MolesManager/moles3epb.py
- Timestamp:
- 02/05/12 11:54:02 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/MolesManager/moles3epb.py
r8264 r8295 16 16 from sqlalchemy.orm import mapper 17 17 from MolesManager.ceda_guid import CedaGUID 18 from ea_model.moles3_4.utilities.mo_responsiblepartyinfo import MO_ResponsiblePartyInfo 19 from ea_model.moles3_4.utilities.mo_rolevalue import MO_RoleValue 18 20 19 21 … … 110 112 intSession = Moles3EPB._getSession(session) 111 113 return intSession.query(CEDA_ObservationCollection, CEDA_Observation).filter(CEDA_ObservationCollection.id==obs_coll_id).filter(CEDA_Observation.id==obs_id).count() > 0 114 115 @classmethod 116 def observationAuthor(self, obs_id, session = None): 117 """ 118 Lists the CEDA_Observation author. 119 @param obs_id: the CEDA_Observation id 120 @return: True if the collection contains the given observation, False otherwise 121 """ 122 intSession = Moles3EPB._getSession(session) 123 ret = intSession.query(MO_ResponsiblePartyInfo).join(MO_Observation). \ 124 filter(MO_ResponsiblePartyInfo.role == MO_RoleValue.cl_author). \ 125 filter(MO_Observation.id == obs_id) 126 return ret 112 127 113 128 @classmethod
Note: See TracChangeset
for help on using the changeset viewer.