Skip to content
Snippets Groups Projects
Commit 3885fb1a authored by felmer's avatar felmer
Browse files

LMS-2040 DTO builder framework extended

SVN: 19975
parent 83e11743
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders;
import java.util.ArrayList;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetType;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataStore;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty;
......@@ -75,6 +76,12 @@ public class DataSetBuilder
return this;
}
public DataSetBuilder store(DataStore dataStore)
{
dataSet.setDataStore(dataStore);
return this;
}
public final ExternalData getDataSet()
{
return dataSet;
......
/*
* Copyright 2011 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.shared.basic.dto.builders;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataStore;
/**
* Builder class for creating an instance of {@link DataStore}.
*
* @author Franz-Josef Elmer
*/
public class DataStoreBuilder
{
private DataStore store = new DataStore();
public DataStoreBuilder(String dataStoreCode)
{
store.setCode(dataStoreCode);
}
public DataStoreBuilder hostUrl(String hostUrl)
{
store.setHostUrl(hostUrl);
return this;
}
public DataStoreBuilder downloadUrl(String downloadUrl)
{
store.setDownloadUrl(downloadUrl);
return this;
}
public DataStore getStore()
{
return store;
}
}
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