Skip to content
Snippets Groups Projects
Commit f9a743dd authored by ribeaudc's avatar ribeaudc
Browse files

remove: - Unnecessary code.

SVN: 8395
parent aeac5295
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,9 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDatabaseInstanceDAO;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPersonDAO;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IRoleAssignmentDAO;
import ch.systemsx.cisd.openbis.generic.server.util.GroupIdentifierHelper;
import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier;
/**
* An <code>abstract</code> <i>Business Object</i>.
......@@ -67,22 +64,6 @@ abstract class AbstractBusinessObject implements IAuthorizationDAOFactory
DataAccessExceptionTranslator.throwException(exception, subject);
}
/**
* @return id of the group.
* @throws UserFailureException if home group is pointed by it is not set
*/
protected final long figureGroupId(final GroupIdentifier groupIdentifier)
{
GroupPE group =
GroupIdentifierHelper.tryGetGroup(groupIdentifier, findRegistrator(), daoFactory);
if (group == null)
{
throw new UserFailureException(String.format(
"Given group '%s' could not be found in the database.", groupIdentifier));
}
return group.getId();
}
public final DatabaseInstancePE getHomeDatabaseInstance()
{
return daoFactory.getHomeDatabaseInstance();
......
......@@ -21,7 +21,6 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.IIdAndCodeHolder;
import ch.systemsx.cisd.openbis.generic.shared.dto.IIdHolder;
import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.PropertyTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
......@@ -49,18 +48,12 @@ public final class KeyExtractorFactory
private final static IKeyExtractor<String, PropertyTypePE> PROPERTY_TYPE_BY_CODE_KEY_EXTRACTOR =
createCodeKeyExtractor();
private final static IKeyExtractor<Long, MaterialPE> MATERIAL_BY_ID_KEY_EXTRACTOR =
createIdKeyExtractor();
private final static IKeyExtractor<Long, SamplePE> SAMPLE_BY_ID_KEY_EXTRACTOR =
createIdKeyExtractor();
private static final IKeyExtractor<String, PersonPE> PERSON_BY_USER_ID_KEY_EXTRACTOR =
new PersonByUserIdKeyExtractor();
private final static IKeyExtractor<Long, PersonPE> PERSON_BY_ID_KEY_EXTRACTOR =
createIdKeyExtractor();
private KeyExtractorFactory()
{
// Can not be instantiated.
......@@ -98,12 +91,6 @@ public final class KeyExtractorFactory
return DATABASE_INSTANCE_BY_UUID_KEY_EXTRACTOR;
}
/** Returns an <code>IKeyExtractor</code> for <i>MaterialPE</i> based on <code>Id</code>. */
public final static IKeyExtractor<Long, MaterialPE> getMaterialByIdKeyExtractor()
{
return MATERIAL_BY_ID_KEY_EXTRACTOR;
}
/**
* Returns an <code>IKeyExtractor</code> for <i>BaseExperimentDTO</i> based on
* <code>Id</code>.
......@@ -146,15 +133,6 @@ public final class KeyExtractorFactory
return PERSON_BY_USER_ID_KEY_EXTRACTOR;
}
/**
* Returns an <code>IKeyExtractor</code> for <i>PersonPE</i> based on
* {@link PersonPE#getId()}.
*/
public final static IKeyExtractor<Long, PersonPE> getPersonByIdKeyExtractor()
{
return PERSON_BY_ID_KEY_EXTRACTOR;
}
//
// Helper classes
//
......
......@@ -46,17 +46,6 @@ public abstract class AbstractTypePE extends AbstractIdAndCodeHolder<AbstractTyp
this.id = id;
}
public AbstractTypePE(final long id, final String code, final String description)
{
setId(id);
setCode(code);
setDescription(description);
}
public AbstractTypePE()
{
}
@Column(name = ColumnNames.CODE_COLUMN)
@Length(min = 1, max = 40, message = ValidationMessages.CODE_LENGTH_MESSAGE)
@NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment