Tabnine Logo
Configuration.addAttributeConverter
Code IndexAdd Tabnine to your IDE (free)

How to use
addAttributeConverter
method
in
org.hibernate.cfg.Configuration

Best Java code snippets using org.hibernate.cfg.Configuration.addAttributeConverter (Showing top 14 results out of 315)

origin: hibernate/hibernate-orm

/**
 * Adds the AttributeConverter instance to this Configuration.  This form is mainly intended for developers
 * to programmatically add their own AttributeConverter instance.  HEM, instead, uses the
 * {@link #addAttributeConverter(Class, boolean)} form
 *
 * @param attributeConverter The AttributeConverter instance.
 */
public void addAttributeConverter(AttributeConverter attributeConverter) {
  addAttributeConverter( AttributeConverterDefinition.from( attributeConverter ) );
}
origin: hibernate/hibernate-orm

/**
 * Adds the AttributeConverter Class to this Configuration.
 *
 * @param attributeConverterClass The AttributeConverter class.
 */
public void addAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass) {
  addAttributeConverter( AttributeConverterDefinition.from( attributeConverterClass ) );
}
origin: hibernate/hibernate-orm

/**
 * Adds the AttributeConverter instance to this Configuration.  This form is mainly intended for developers
 * to programmatically add their own AttributeConverter instance.  HEM, instead, uses the
 * {@link #addAttributeConverter(Class, boolean)} form
 *
 * @param attributeConverter The AttributeConverter instance.
 * @param autoApply Should the AttributeConverter be auto applied to property types as specified
 * by its "entity attribute" parameterized type?
 */
public void addAttributeConverter(AttributeConverter attributeConverter, boolean autoApply) {
  addAttributeConverter( AttributeConverterDefinition.from( attributeConverter, autoApply ) );
}
origin: hibernate/hibernate-orm

/**
 * Adds the AttributeConverter Class to this Configuration.
 *
 * @param attributeConverterClass The AttributeConverter class.
 * @param autoApply Should the AttributeConverter be auto applied to property types as specified
 * by its "entity attribute" parameterized type?
 */
public void addAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass, boolean autoApply) {
  addAttributeConverter( AttributeConverterDefinition.from( attributeConverterClass, autoApply ) );
}
origin: hibernate/hibernate-orm

@Test
public void testBasicTimestampUsage() {
  Configuration cfg = new Configuration();
  cfg.addAttributeConverter( InstantConverter.class, false );
  cfg.addAnnotatedClass( IrrelevantInstantEntity.class );
  cfg.setProperty( AvailableSettings.HBM2DDL_AUTO, "create-drop" );
origin: hibernate/hibernate-orm

@Test
public void testBasicUsage() {
  Configuration cfg = new Configuration();
  cfg.addAttributeConverter( IntegerToVarcharConverter.class, false );
  cfg.addAnnotatedClass( Tester4.class );
  cfg.setProperty( AvailableSettings.HBM2DDL_AUTO, "create-drop" );
origin: hibernate/hibernate-orm

@Test
public void testErrorInstantiatingConverterClass() {
  Configuration cfg = new Configuration();
  try {
    cfg.addAttributeConverter( BlowsUpConverter.class );
    fail( "expecting an exception" );
  }
  catch (AnnotationException e) {
    assertTyping( BlewUpException.class, ExceptionUtil.rootCause( e ) );
  }
}
origin: hibernate/hibernate-orm

@Test
public void testChangeImmutableAttribute(){
  configuration().addAttributeConverter( ExifConverter.class);
  configuration().addAttributeConverter( CaptionConverter.class);
origin: hibernate/hibernate-orm

@Test
public void testImmutableAttribute(){
  configuration().addAttributeConverter( ExifConverter.class);
  configuration().addAttributeConverter( CaptionConverter.class);
  Session s = openSession();
  Transaction tx = s.beginTransaction();
origin: apache/servicemix-bundles

  @SuppressWarnings("unchecked")
  public static void registerConverter(Configuration config, Class<?> converterClass) {
    config.addAttributeConverter((Class<? extends AttributeConverter<?, ?>>) converterClass);
  }
}
origin: org.hibernate.orm/hibernate-core

/**
 * Adds the AttributeConverter instance to this Configuration.  This form is mainly intended for developers
 * to programmatically add their own AttributeConverter instance.  HEM, instead, uses the
 * {@link #addAttributeConverter(Class, boolean)} form
 *
 * @param attributeConverter The AttributeConverter instance.
 */
public void addAttributeConverter(AttributeConverter attributeConverter) {
  addAttributeConverter( new InstanceBasedConverterDescriptor( attributeConverter, classmateContext ) );
}
origin: org.hibernate.orm/hibernate-core

/**
 * Adds the AttributeConverter instance to this Configuration.  This form is mainly intended for developers
 * to programmatically add their own AttributeConverter instance.  HEM, instead, uses the
 * {@link #addAttributeConverter(Class, boolean)} form
 *
 * @param attributeConverter The AttributeConverter instance.
 * @param autoApply Should the AttributeConverter be auto applied to property types as specified
 * by its "entity attribute" parameterized type?
 */
public void addAttributeConverter(AttributeConverter attributeConverter, boolean autoApply) {
  addAttributeConverter( new InstanceBasedConverterDescriptor( attributeConverter, autoApply, classmateContext ) );
}
origin: org.hibernate.orm/hibernate-core

/**
 * Adds the AttributeConverter Class to this Configuration.
 *
 * @param converterClass The AttributeConverter class.
 */
public <O,R> void addAttributeConverter(Class<? extends AttributeConverter<O,R>> converterClass) {
  addAttributeConverter( new ClassBasedConverterDescriptor( converterClass, classmateContext ) );
}
origin: org.hibernate.orm/hibernate-core

/**
 * Adds the AttributeConverter Class to this Configuration.
 *
 * @param converterClass The AttributeConverter class.
 * @param autoApply Should the AttributeConverter be auto applied to property types as specified
 * by its "entity attribute" parameterized type?
 */
public <O,R> void addAttributeConverter(Class<? extends AttributeConverter<O,R>> converterClass, boolean autoApply) {
  addAttributeConverter( new ClassBasedConverterDescriptor( converterClass, autoApply, classmateContext ) );
}
org.hibernate.cfgConfigurationaddAttributeConverter

Javadoc

Adds the AttributeConverter Class to this Configuration.

Popular methods of Configuration

  • buildSessionFactory
    Create a SessionFactory using the properties and mappings in this configuration. The SessionFactory
  • <init>
  • getProperties
    Get all properties
  • configure
    Use the mappings and properties specified in the given XML document. The format of the file is defin
  • setProperty
    Set a property value by name
  • addAnnotatedClass
    Read metadata from the annotations associated with this class.
  • getProperty
    Get a property value by name
  • addProperties
  • setProperties
    Specify a completely new set of properties
  • addResource
    Read mappings as a application resource (i.e. classpath lookup).
  • addClass
    Read a mapping as an application resource using the convention that a class named foo.bar.Foo is map
  • setInterceptor
    Set the current Interceptor
  • addClass,
  • setInterceptor,
  • generateSchemaCreationScript,
  • addInputStream,
  • getClassMappings,
  • addFile,
  • getTableMappings,
  • buildMappings,
  • generateDropSchemaScript,
  • generateSchemaUpdateScript

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now