Interface VariableService

  • All Superinterfaces:
    Queryable<Variable,​cern.nxcals.api.extraction.metadata.queries.Variables>

    public interface VariableService
    extends Queryable<Variable,​cern.nxcals.api.extraction.metadata.queries.Variables>
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      Variable create​(Variable variable)
      Creates variable as in the parameter NOTE: this is a mutative method.
      java.util.Set<Variable> createAll​(java.util.Set<Variable> variables)
      Creates the given set of variables NOTE: this is a mutative method.
      void delete​(long variableId)
      Deletes an existing variable
      void deleteAll​(java.util.Set<java.lang.Long> variableIds)
      Deletes an existing set of variables
      java.util.Set<Variable> findAll​(cern.nxcals.api.metadata.queries.ConditionWithOptions<cern.nxcals.api.metadata.queries.Variables,​cern.nxcals.api.metadata.queries.VariableQueryWithOptions> condition)
      Find all, which matches condition - experimental
      java.util.List<Variable> findAll​(cern.nxcals.api.metadata.queries.VariableQueryWithOptions condition)
      Find all, but allows to pass additional options - experimental
      java.util.Optional<Variable> findOne​(cern.nxcals.api.metadata.queries.ConditionWithOptions<cern.nxcals.api.metadata.queries.Variables,​cern.nxcals.api.metadata.queries.VariableQueryWithOptions> condition)
      Find one or zero, which matches condition - experimental
      java.util.Optional<Variable> findOne​(cern.nxcals.api.metadata.queries.VariableQueryWithOptions condition)
      Find one, but allows to pass additional options - experimental
      default java.util.Map<TimeWindow,​org.apache.avro.Schema> findSchemas​(Variable variable, TimeWindow timeWindow)
      Returns schemas for given variable
      default java.util.Map<Variable,​java.util.Map<TimeWindow,​org.apache.avro.Schema>> findSchemas​(java.util.Set<Variable> variables, TimeWindow timeWindow)
      Returns schemas for given variables
      java.util.Map<TimeWindow,​org.apache.avro.Schema> findSchemasById​(long variableId, TimeWindow timeWindow)
      Returns schemas for given variable
      java.util.Map<java.lang.Long,​java.util.Map<TimeWindow,​org.apache.avro.Schema>> findSchemasById​(java.util.Set<java.lang.Long> variableIds, TimeWindow timeWindow)
      Returns schemas for given variables
      Variable update​(Variable variable)
      Updates an existing variable to the new values as in the parameter NOTE: this is a mutative method.
      java.util.Set<Variable> updateAll​(java.util.Set<Variable> variables)
      Updates existing variables based on the provided set NOTE: this is a mutative method.
    • Method Detail

      • create

        Variable create​(Variable variable)
        Creates variable as in the parameter NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallel
        Parameters:
        variable - to be created
        Returns:
        Created variable
      • update

        Variable update​(Variable variable)
        Updates an existing variable to the new values as in the parameter NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallel
        Parameters:
        variable - to be updated
        Returns:
        Updated variable
      • createAll

        java.util.Set<Variable> createAll​(java.util.Set<Variable> variables)
        Creates the given set of variables NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallel
        Parameters:
        variables - to be created
        Returns:
        Created variables
      • updateAll

        java.util.Set<Variable> updateAll​(java.util.Set<Variable> variables)
        Updates existing variables based on the provided set NOTE: this is a mutative method. It is not thread-safe or meant to be used in parallel
        Parameters:
        variables - to be updated
        Returns:
        Updated variables
      • delete

        void delete​(long variableId)
        Deletes an existing variable
        Parameters:
        variableId - the id of the variable to be deleted
      • deleteAll

        void deleteAll​(java.util.Set<java.lang.Long> variableIds)
        Deletes an existing set of variables
        Parameters:
        variableIds - the ids of the variables to be deleted
      • findAll

        @Experimental
        java.util.List<Variable> findAll​(cern.nxcals.api.metadata.queries.VariableQueryWithOptions condition)
        Find all, but allows to pass additional options - experimental
      • findOne

        @Experimental
        java.util.Optional<Variable> findOne​(cern.nxcals.api.metadata.queries.VariableQueryWithOptions condition)
        Find one, but allows to pass additional options - experimental
      • findAll

        @Experimental
        java.util.Set<Variable> findAll​(cern.nxcals.api.metadata.queries.ConditionWithOptions<cern.nxcals.api.metadata.queries.Variables,​cern.nxcals.api.metadata.queries.VariableQueryWithOptions> condition)
        Find all, which matches condition - experimental
      • findOne

        @Experimental
        java.util.Optional<Variable> findOne​(cern.nxcals.api.metadata.queries.ConditionWithOptions<cern.nxcals.api.metadata.queries.Variables,​cern.nxcals.api.metadata.queries.VariableQueryWithOptions> condition)
        Find one or zero, which matches condition - experimental
      • findSchemasById

        @Experimental
        java.util.Map<TimeWindow,​org.apache.avro.Schema> findSchemasById​(long variableId,
                                                                               TimeWindow timeWindow)
        Returns schemas for given variable
      • findSchemas

        @Experimental
        default java.util.Map<TimeWindow,​org.apache.avro.Schema> findSchemas​(Variable variable,
                                                                                   TimeWindow timeWindow)
        Returns schemas for given variable
      • findSchemasById

        @Experimental
        java.util.Map<java.lang.Long,​java.util.Map<TimeWindow,​org.apache.avro.Schema>> findSchemasById​(java.util.Set<java.lang.Long> variableIds,
                                                                                                                   TimeWindow timeWindow)
        Returns schemas for given variables
      • findSchemas

        @Experimental
        default java.util.Map<Variable,​java.util.Map<TimeWindow,​org.apache.avro.Schema>> findSchemas​(java.util.Set<Variable> variables,
                                                                                                                 TimeWindow timeWindow)
        Returns schemas for given variables