22
33import org .json .JSONObject ;
44
5+ import java .util .Date ;
6+ import java .util .Map ;
7+
58public class PlateSetParams
69{
710 private boolean _archived ;
@@ -22,6 +25,10 @@ public class PlateSetParams
2225 private boolean _template ;
2326 private CreatePlateSetParams .PlateSetType _plateSetType ;
2427
28+ private PlateSetParams ()
29+ {
30+ }
31+
2532 public PlateSetParams (JSONObject json )
2633 {
2734 if (json .has ("archived" ))
@@ -58,6 +65,29 @@ public PlateSetParams(JSONObject json)
5865 _plateSetType = CreatePlateSetParams .PlateSetType .fromName (json .getString ("type" ));
5966 }
6067
68+ public static PlateSetParams fromQueryRow (Map <String , Object > row )
69+ {
70+ var params = new PlateSetParams ();
71+ params ._containerId = (String ) row .get ("Folder/EntityId" );
72+ params ._containerName = (String ) row .get ("Folder/Name" );
73+ params ._containerPath = (String ) row .get ("Folder/Path" );
74+ params ._created = row .get ("Created" ).toString ();
75+ params ._createdBy = (Integer ) row .get ("CreatedBy" );
76+ params ._description = (String ) row .get ("Description" );
77+ params ._modified = row .get ("Modified" ).toString ();
78+ params ._modifiedBy = (Integer ) row .get ("ModifiedBy" );
79+ params ._name = (String ) row .get ("Name" );
80+ params ._plateCount = (Integer ) row .get ("PlateCount" );
81+ params ._plateSetId = (String ) row .get ("PlateSetId" );
82+ params ._plateSetType = CreatePlateSetParams .PlateSetType .fromName ((String ) row .get ("Type" ));
83+ params ._primaryPlateSetId = (Integer ) row .get ("PrimaryPlateSetId" );
84+ params ._rootPlateSetId = (Integer ) row .get ("RootPlateSetId" );
85+ params ._rowId = (Integer ) row .get ("RowId" );
86+ params ._template = (Boolean ) row .get ("Template" );
87+
88+ return params ;
89+ }
90+
6191 public boolean getArchived ()
6292 {
6393 return _archived ;
0 commit comments