Subversion Repositories WebE

Compare Revisions

Last modification

Ignore whitespace Rev 27 → Rev 26

/trunk/src/ch/ffhs/webE/dao/RelationshipTypeDAOImpl.java
57,11 → 57,11
* relationshipType
*/
@Override
public boolean saveOrUpdateRelType(RelationshipType relType)
public boolean saveRelationshipType(RelationshipType relType)
{
try
{
session.saveOrUpdate(relType);
session.save(relType);
return true;
}
catch (Exception e)
83,9 → 83,8
{
try
{
RelationshipType relType = (RelationshipType) session.get(
RelationshipType.class, relTypeID);
session.delete(relType);
User user = (User) session.get(RelationshipType.class, relTypeID);
session.delete(user);
return true;
}
catch (Exception e)
95,24 → 94,4
return false;
}
}
 
/**
* Used to get a relationship type by ID
*/
@Override
public RelationshipType listRelTypeById(int relTypeID)
{
RelationshipType relType = null;
try
{
relType = (RelationshipType) session.get(RelationshipType.class,
relTypeID);
}
catch (Exception e)
{
e.printStackTrace();
// TODO: Logging
}
return relType;
}
}