Clover icon

sunshower-base

  1. Project Clover database Fri Apr 6 2018 03:41:27 UTC
  2. Package io.sunshower.persist.hibernate

File TypeRegistrationBuilderFactory.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
2
1
1
16
14
1
0.5
2
1
1

Classes

Class Line # Actions
TypeRegistrationBuilderFactory 9 2 1
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.persist.hibernate;
2   
3    import io.sunshower.persist.hibernate.types.FlakeIdentifierType;
4    import org.hibernate.boot.SessionFactoryBuilder;
5    import org.hibernate.boot.spi.MetadataImplementor;
6    import org.hibernate.boot.spi.SessionFactoryBuilderFactory;
7    import org.hibernate.boot.spi.SessionFactoryBuilderImplementor;
8   
 
9    public class TypeRegistrationBuilderFactory implements SessionFactoryBuilderFactory {
 
10  4 toggle @Override
11    public SessionFactoryBuilder getSessionFactoryBuilder(
12    MetadataImplementor metadata, SessionFactoryBuilderImplementor defaultBuilder) {
13  4 metadata.getTypeResolver().registerTypeOverride(FlakeIdentifierType.INSTANCE);
14  4 return defaultBuilder;
15    }
16    }