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

org.infinispan.persistence.sql.configuration.SchemaJdbcConfiguration 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 SchemaJdbcConfiguration extends ConfigurationElement {
   public static final AttributeDefinition MESSAGE_NAME = AttributeDefinition.builder(Attribute.MESSAGE_NAME, null, String.class).immutable().build();
   public static final AttributeDefinition KEY_MESSAGE_NAME = AttributeDefinition.builder(Attribute.KEY_MESSAGE_NAME, null, String.class).immutable().build();
   public static final AttributeDefinition PACKAGE = AttributeDefinition.builder(Attribute.PACKAGE, null, String.class).immutable().build();
   public static final AttributeDefinition EMBEDDED_KEY = AttributeDefinition.builder(Attribute.EMBEDDED_KEY, Boolean.FALSE).immutable().build();

   public static AttributeSet attributeDefinitionSet() {
      return new AttributeSet(SchemaJdbcConfiguration.class, MESSAGE_NAME, KEY_MESSAGE_NAME, PACKAGE, EMBEDDED_KEY);
   }

   SchemaJdbcConfiguration(AttributeSet attributes) {
      super(Element.SCHEMA, attributes);
   }

   public String messageName() {
      return attributes.attribute(MESSAGE_NAME).get();
   }

   public String keyMessageName() {
      return attributes.attribute(KEY_MESSAGE_NAME).get();
   }

   public String packageName() {
      return attributes.attribute(PACKAGE).get();
   }

   public boolean embeddedKey() {
      return attributes.attribute(EMBEDDED_KEY).get();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy