All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.persistence.sql.configuration.QueriesJdbcConfiguration Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev05
Show newest version
package org.infinispan.persistence.sql.configuration;

import org.infinispan.commons.configuration.attributes.AttributeDefinition;
import org.infinispan.commons.configuration.attributes.AttributeSet;
import org.infinispan.commons.configuration.attributes.ConfigurationElement;
import org.infinispan.persistence.jdbc.common.configuration.Attribute;
import org.infinispan.persistence.jdbc.common.configuration.Element;

public class QueriesJdbcConfiguration extends ConfigurationElement {
   public static final AttributeDefinition SELECT = AttributeDefinition.builder(Attribute.SELECT_SINGLE, null, String.class).immutable().build();
   public static final AttributeDefinition SELECT_ALL = AttributeDefinition.builder(Attribute.SELECT_ALL, null, String.class).immutable().build();
   public static final AttributeDefinition DELETE = AttributeDefinition.builder(Attribute.DELETE_SINGLE, null, String.class).immutable().build();
   public static final AttributeDefinition DELETE_ALL = AttributeDefinition.builder(Attribute.DELETE_ALL, null, String.class).immutable().build();
   public static final AttributeDefinition UPSERT = AttributeDefinition.builder(Attribute.UPSERT, null, String.class).immutable().build();
   public static final AttributeDefinition SIZE = AttributeDefinition.builder(Attribute.SIZE, null, String.class).immutable().build();

   public static AttributeSet attributeDefinitionSet() {
      return new AttributeSet(QueriesJdbcConfiguration.class, SELECT, SELECT_ALL, DELETE, DELETE_ALL, UPSERT, SIZE);
   }

   QueriesJdbcConfiguration(AttributeSet attributes) {
      super(Element.QUERIES, attributes);
   }

   public String select() {
      return attributes.attribute(SELECT).get();
   }

   public String selectAll() {
      return attributes.attribute(SELECT_ALL).get();
   }

   public String delete() {
      return attributes.attribute(DELETE).get();
   }

   public String deleteAll() {
      return attributes.attribute(DELETE_ALL).get();
   }

   public String upsert() {
      return attributes.attribute(UPSERT).get();
   }

   public String size() {
      return attributes.attribute(SIZE).get();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy