Skip to content

Commit d800faf

Browse files
anki2189sbespalov
authored andcommitted
Cosmetic review fixes
1 parent 4faf5e0 commit d800faf

File tree

1 file changed

+86
-26
lines changed

1 file changed

+86
-26
lines changed

strongbox-db-schema/src/main/java/org/carlspring/strongbox/db/schema/StrongboxSchema.java

Lines changed: 86 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -270,38 +270,98 @@ private void applyConnectionConstraints(JanusGraphManagement jgm)
270270
private void applyPropertyConstraints(JanusGraphManagement jgm)
271271
{
272272
// Vertex Property Constraints
273-
addVertexPropertyConstraints(jgm, ARTIFACT, "uuid", "storageId", "repositoryId", "created", "lastUpdated",
274-
"lastUsed", "sizeInBytes", "downloadCount", "filenames", "checksums");
275-
276-
addVertexPropertyConstraints(jgm, REMOTE_ARTIFACT, "uuid", "cached");
277-
278-
addVertexPropertyConstraints(jgm, GENERIC_ARTIFACT_COORDINATES, "uuid", "version", "coordinates.extension",
273+
addVertexPropertyConstraints(jgm,
274+
ARTIFACT,
275+
"uuid",
276+
"storageId",
277+
"repositoryId",
278+
"created",
279+
"lastUpdated",
280+
"lastUsed",
281+
"sizeInBytes",
282+
"downloadCount",
283+
"filenames",
284+
"checksums");
285+
286+
addVertexPropertyConstraints(jgm,
287+
REMOTE_ARTIFACT,
288+
"uuid",
289+
"cached");
290+
291+
addVertexPropertyConstraints(jgm,
292+
GENERIC_ARTIFACT_COORDINATES,
293+
"uuid",
294+
"version",
295+
"coordinates.extension",
279296
"coordinates.name");
280297

281-
addVertexPropertyConstraints(jgm, RAW_ARTIFACT_COORDINATES, "uuid", "version", "coordinates.extension",
282-
"coordinates.name", "coordinates.path");
283-
284-
addVertexPropertyConstraints(jgm, MAVEN_ARTIFACT_COORDINATES, "uuid", "version", "coordinates.extension",
285-
"coordinates.name", "coordinates.groupId", "coordinates.artifactId",
298+
addVertexPropertyConstraints(jgm,
299+
RAW_ARTIFACT_COORDINATES,
300+
"uuid",
301+
"version",
302+
"coordinates.extension",
303+
"coordinates.name",
304+
"coordinates.path");
305+
306+
addVertexPropertyConstraints(jgm,
307+
MAVEN_ARTIFACT_COORDINATES,
308+
"uuid",
309+
"version",
310+
"coordinates.extension",
311+
"coordinates.name",
312+
"coordinates.groupId",
313+
"coordinates.artifactId",
286314
"coordinates.classifier");
287315

288-
addVertexPropertyConstraints(jgm, NPM_ARTIFACT_COORDINATES, "uuid", "version", "coordinates.extension",
289-
"coordinates.name", "coordinates.scope");
290-
291-
addVertexPropertyConstraints(jgm, NUGET_ARTIFACT_COORDINATES, "uuid", "version", "coordinates.extension",
292-
"coordinates.name", "coordinates.id");
293-
294-
addVertexPropertyConstraints(jgm, PYPI_ARTIFACT_COORDINATES, "uuid", "version", "coordinates.extension",
295-
"coordinates.name", "coordinates.build", "coordinates.abi", "coordinates.platform",
296-
"coordinates.languageImplementationVersion", "coordinates.packaging",
316+
addVertexPropertyConstraints(jgm,
317+
NPM_ARTIFACT_COORDINATES,
318+
"uuid",
319+
"version",
320+
"coordinates.extension",
321+
"coordinates.name",
322+
"coordinates.scope");
323+
324+
addVertexPropertyConstraints(jgm,
325+
NUGET_ARTIFACT_COORDINATES,
326+
"uuid",
327+
"version",
328+
"coordinates.extension",
329+
"coordinates.name",
330+
"coordinates.id");
331+
332+
addVertexPropertyConstraints(jgm,
333+
PYPI_ARTIFACT_COORDINATES,
334+
"uuid",
335+
"version",
336+
"coordinates.extension",
337+
"coordinates.name",
338+
"coordinates.build",
339+
"coordinates.abi",
340+
"coordinates.platform",
341+
"coordinates.languageImplementationVersion",
342+
"coordinates.packaging",
297343
"coordinates.distribution");
298344

299-
addVertexPropertyConstraints(jgm, ARTIFACT_TAG, "uuid");
300-
301-
addVertexPropertyConstraints(jgm, ARTIFACT_ID_GROUP, "uuid", "storageId", "repositoryId", "name");
302-
303-
addVertexPropertyConstraints(jgm, USER, "uuid", "username", "password",
304-
"enabled", "roles", "securityTokenKey", "sourceId");
345+
addVertexPropertyConstraints(jgm,
346+
ARTIFACT_TAG,
347+
"uuid");
348+
349+
addVertexPropertyConstraints(jgm,
350+
ARTIFACT_ID_GROUP,
351+
"uuid",
352+
"storageId",
353+
"repositoryId",
354+
"name");
355+
356+
addVertexPropertyConstraints(jgm,
357+
USER,
358+
"uuid",
359+
"username",
360+
"password",
361+
"enabled",
362+
"roles",
363+
"securityTokenKey",
364+
"sourceId");
305365
}
306366

307367
private void addVertexPropertyConstraints(JanusGraphManagement jgm,

0 commit comments

Comments
 (0)