Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/src/org/labkey/api/assay/AssaySchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public abstract class AssaySchema extends UserSchema
@Nullable
protected Container _targetStudy;

public AssaySchema(String name, User user, Container container, DbSchema dbSchema, @Nullable Container targetStudy)
public AssaySchema(String name, @NotNull User user, @NotNull Container container, DbSchema dbSchema, @Nullable Container targetStudy)
{
this(SchemaKey.fromParts(name), DESCR, user, container, dbSchema, targetStudy);
}

protected AssaySchema(SchemaKey path, String description, User user, Container container, DbSchema dbSchema, @Nullable Container targetStudy)
protected AssaySchema(SchemaKey path, String description, @NotNull User user, @NotNull Container container, DbSchema dbSchema, @Nullable Container targetStudy)
{
super(path, description, user, container, dbSchema, null);
_targetStudy = targetStudy;
Expand Down
2 changes: 1 addition & 1 deletion api/src/org/labkey/api/exp/query/AbstractExpSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public abstract class AbstractExpSchema extends UserSchema
{
protected ContainerFilter _containerFilter = null;

public AbstractExpSchema(String name, String description, User user, Container container, DbSchema dbSchema)
public AbstractExpSchema(String name, String description, @NotNull User user, @NotNull Container container, DbSchema dbSchema)
{
this(SchemaKey.fromParts(name), description, user, container, dbSchema);
}
Expand Down
8 changes: 5 additions & 3 deletions api/src/org/labkey/api/query/AbstractSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.labkey.api.query;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.data.AbstractTableInfo;
import org.labkey.api.data.Container;
Expand All @@ -29,6 +30,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;

abstract public class AbstractSchema implements QuerySchema
Expand All @@ -39,11 +41,11 @@ abstract public class AbstractSchema implements QuerySchema
protected final Container _container;
protected boolean _hidden = false;

public AbstractSchema(DbSchema dbSchema, User user, Container container)
public AbstractSchema(DbSchema dbSchema, @NotNull User user, @NotNull Container container)
{
_dbSchema = dbSchema;
_user = user;
_container = container;
_user = Objects.requireNonNull(user);
_container = Objects.requireNonNull(container);
MemTracker.get().put(this);
}

Expand Down
2 changes: 1 addition & 1 deletion api/src/org/labkey/api/query/DefaultSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static QuerySchema resolve(QuerySchema schema, SchemaKey schemaPath)
return schema;
}

private DefaultSchema(User user, Container container)
private DefaultSchema(@NotNull User user, @NotNull Container container)
{
super(null, user, container);
MemTracker.getInstance().put(this);
Expand Down
2 changes: 1 addition & 1 deletion api/src/org/labkey/api/query/SimpleUserSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class SimpleUserSchema extends UserSchema
private final Set<String> _available = new CaseInsensitiveTreeSet();
protected Set<String> _visible;

public SimpleUserSchema(String name, @Nullable String description, User user, Container container, DbSchema dbschema)
public SimpleUserSchema(String name, @Nullable String description, @NotNull User user, @NotNull Container container, DbSchema dbschema)
{
super(name, description, user, container, dbschema);
if (dbschema != null)
Expand Down
4 changes: 2 additions & 2 deletions api/src/org/labkey/api/query/UserSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ abstract public class UserSchema extends AbstractSchema implements MemTrackable

protected java.util.function.Predicate<TableInfo> _getTableAcceptor = (t) -> true;

public UserSchema(@NotNull String name, @Nullable String description, User user, Container container, DbSchema dbSchema)
public UserSchema(@NotNull String name, @Nullable String description, @NotNull User user, @NotNull Container container, DbSchema dbSchema)
{
this(SchemaKey.fromParts(name), description, user, container, dbSchema, null);
}

public UserSchema(@NotNull SchemaKey path, @Nullable String description, User user, Container container, DbSchema dbSchema, Collection<UserSchemaCustomizer> schemaCustomizers)
public UserSchema(@NotNull SchemaKey path, @Nullable String description, @NotNull User user, @NotNull Container container, DbSchema dbSchema, Collection<UserSchemaCustomizer> schemaCustomizers)
{
super(dbSchema, user, container);
_name = path.getName();
Expand Down
6 changes: 3 additions & 3 deletions study/src/org/labkey/study/query/StudyQuerySchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public class StudyQuerySchema extends UserSchema implements UserSchema.HasContex


/** use StudyQuerySchema.createSchema() */
protected StudyQuerySchema(@NotNull StudyImpl study, User user, @Nullable Role contextualRole)
protected StudyQuerySchema(@NotNull StudyImpl study, @NotNull User user, @Nullable Role contextualRole)
{
this(study, study.getContainer(), user, contextualRole);

Expand All @@ -207,15 +207,15 @@ protected StudyQuerySchema(@NotNull StudyImpl study, User user, @Nullable Role c
/**
* This c-tor is for schemas that have no study defined -- _study is null!
*/
private StudyQuerySchema(@Nullable StudyImpl study, Container c, User user, @Nullable Role contextualRole)
private StudyQuerySchema(@Nullable StudyImpl study, @NotNull Container c, @NotNull User user, @Nullable Role contextualRole)
{
this(SchemaKey.fromParts(SCHEMA_NAME), SCHEMA_DESCRIPTION, study, c, user, contextualRole);
}

/**
* This c-tor is for nested study schemas
*/
protected StudyQuerySchema(SchemaKey path, String description, @Nullable StudyImpl study, Container c, User user, @Nullable Role contextualRole)
protected StudyQuerySchema(SchemaKey path, String description, @Nullable StudyImpl study, @NotNull Container c, @NotNull User user, @Nullable Role contextualRole)
{
super(path, description, user, c, StudySchema.getInstance().getSchema(), null);
_study = study;
Expand Down