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
f528a0e1
Commit
f528a0e1
authored
1 year ago
by
Adam Laskowski
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-55: changed how property values are provided for EntityPropertiesConverter
parent
e7f9ee82
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java
+21
-1
21 additions, 1 deletion
.../generic/server/dataaccess/EntityPropertiesConverter.java
with
21 additions
and
1 deletion
server-application-server/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/EntityPropertiesConverter.java
+
21
−
1
View file @
f528a0e1
...
...
@@ -268,7 +268,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert
{
final
String
propertyCode
=
property
.
getPropertyType
().
getCode
();
final
PropertyTypePE
propertyType
=
getPropertyType
(
propertyCode
);
final
Serializable
valueOrNull
=
p
roperty
.
get
Value
();
final
Serializable
valueOrNull
=
getP
ropertyValue
(
property
);
ExtendedEntityTypePropertyType
extendedETPT
=
getEntityTypePropertyType
(
entityTypePE
,
propertyType
);
final
EntityTypePropertyTypePE
entityTypePropertyTypePE
=
...
...
@@ -306,6 +306,26 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert
return
null
;
}
private
Serializable
getPropertyValue
(
final
IEntityProperty
property
)
{
Serializable
result
=
property
.
getValue
();
if
(
result
!=
null
)
{
return
result
;
}
result
=
property
.
getVocabularyTerm
();
if
(
result
!=
null
)
{
return
result
;
}
result
=
property
.
getSample
();
if
(
result
!=
null
)
{
return
result
;
}
result
=
property
.
getMaterial
();
if
(
result
!=
null
)
{
return
result
;
}
return
property
.
tryGetAsString
();
}
private
final
<
T
extends
EntityPropertyPE
>
List
<
T
>
createEntityProperty
(
final
PersonPE
registrator
,
final
PropertyTypePE
propertyType
,
...
...
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