Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
2c7ba79e
Commit
2c7ba79e
authored
14 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1153 Created new PE for checking DataSet access rights.
SVN: 15665
parent
dcc4f063
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java
+108
-0
108 additions, 0 deletions
...emsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java
with
108 additions
and
0 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java
0 → 100644
+
108
−
0
View file @
2c7ba79e
/*
* Copyright 2010 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.dto
;
import
javax.persistence.Entity
;
import
javax.persistence.EntityResult
;
import
javax.persistence.Id
;
import
javax.persistence.NamedNativeQuery
;
import
javax.persistence.SqlResultSetMapping
;
/**
* @author Chandrasekhar Ramakrishnan
*/
@Entity
@SqlResultSetMapping
(
name
=
"implicit"
,
entities
=
@EntityResult
(
entityClass
=
DataSetAccessPE
.
class
))
@NamedNativeQuery
(
name
=
"dataset_access"
,
query
=
"select "
+
"ds.id as dataSetId, ds.code as dataSetCode, g.code as groupCode, dbi.uuid as databaseInstanceUuid, dbi.code as databaseInstanceCode "
+
"from "
+
TableNames
.
DATA_TABLE
+
" ds, "
+
TableNames
.
EXPERIMENTS_TABLE
+
" e, "
+
TableNames
.
PROJECTS_TABLE
+
" p, "
+
TableNames
.
GROUPS_TABLE
+
" g, "
+
TableNames
.
DATABASE_INSTANCES_TABLE
+
" dbi "
+
"where ds.code=? and e.id = ds.expe_id and p.id = e.proj_id and g.id = p.grou_id and dbi.id = g.dbin_id"
,
resultSetMapping
=
"implicit"
)
public
class
DataSetAccessPE
{
private
String
dataSetId
;
private
String
dataSetCode
;
private
String
groupCode
;
private
String
databaseInstanceUuid
;
private
String
databaseInstanceCode
;
public
final
static
String
DATASET_ACCESS_QUERY_NAME
=
"dataset_access"
;
void
setDataSetId
(
String
dataSetId
)
{
this
.
dataSetId
=
dataSetId
;
}
void
setDataSetCode
(
String
dataSetCode
)
{
this
.
dataSetCode
=
dataSetCode
;
}
void
setGroupCode
(
String
groupCode
)
{
this
.
groupCode
=
groupCode
;
}
void
setDatabaseInstanceUuid
(
String
databaseInstanceUuid
)
{
this
.
databaseInstanceUuid
=
databaseInstanceUuid
;
}
void
setDatabaseInstanceCode
(
String
databaseInstanceCode
)
{
this
.
databaseInstanceCode
=
databaseInstanceCode
;
}
@Id
public
String
getDataSetId
()
{
return
dataSetId
;
}
public
String
getDataSetCode
()
{
return
dataSetCode
;
}
public
String
getGroupCode
()
{
return
groupCode
;
}
public
String
getDatabaseInstanceUuid
()
{
return
databaseInstanceUuid
;
}
public
String
getDatabaseInstanceCode
()
{
return
databaseInstanceCode
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment