Codota Logo
ClassMetadata.getPropertyLaziness
Code IndexAdd Codota to your IDE (free)

How to use
getPropertyLaziness
method
in
org.hibernate.metadata.ClassMetadata

Best Java code snippets using org.hibernate.metadata.ClassMetadata.getPropertyLaziness (Showing top 1 results out of 315)

  • Common ways to obtain ClassMetadata
private void myMethod () {
ClassMetadata c =
  • Codota IconSessionFactory sessionFactory;Class entityClass;sessionFactory.getClassMetadata(entityClass)
  • Codota IconSessionFactory sessionFactory;String entityName;sessionFactory.getClassMetadata(entityName)
  • Codota IconSessionFactory sessionFactory;Object object;sessionFactory.getClassMetadata(object.getClass())
  • Smart code suggestions by Codota
}
origin: stackoverflow.com

 ClassMetadata meta = sessionFactory.getClassMetadata(entity.getClass());
String[] propertyNames = meta.getPropertyNames();
boolean[] propertyLaziness = meta.getPropertyLaziness();

for (int i = 0; i < propertyNames.length; i++) {
  String propertyName = propertyNames[i];

  // Check if the property fetch type is Lazy
  if (propertyLaziness[i]) {
    System.out.println("Property : " + propertyName + " fetch type is Lazy");
  }
}
org.hibernate.metadataClassMetadatagetPropertyLaziness

Javadoc

Get the "laziness" of the properties of this class

Popular methods of ClassMetadata

  • getIdentifierPropertyName
    Get the name of the identifier property (or return null)
  • getIdentifierType
    Get the identifier Hibernate type
  • getEntityName
    The name of the entity
  • getPropertyNames
    Get the names of the class' persistent properties
  • getMappedClass
    The persistent class, or null
  • getIdentifier
  • getPropertyType
    Get the type of a particular (named) property
  • getPropertyTypes
    Get the Hibernate types of the class properties
  • getPropertyValue
    Get the value of a particular (named) property
  • getPropertyValues
    Extract the property values from the given entity.
  • hasIdentifierProperty
    Does this class have an identifier property?
  • setPropertyValue
    Set the value of a particular (named) property
  • hasIdentifierProperty,
  • setPropertyValue,
  • instantiate,
  • getVersionProperty,
  • setIdentifier,
  • getPropertyNullability,
  • getVersion,
  • isVersioned,
  • getNaturalIdentifierProperties

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now