Tabnine Logo
ArrayHelper.countTrue
Code IndexAdd Tabnine to your IDE (free)

How to use
countTrue
method
in
org.hibernate.internal.util.collections.ArrayHelper

Best Java code snippets using org.hibernate.internal.util.collections.ArrayHelper.countTrue (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

public static String[] join(String[] x, String[] y, boolean[] use) {
  String[] result = new String[x.length + countTrue( use )];
  System.arraycopy( x, 0, result, 0, x.length );
  int k = x.length;
  for ( int i = 0; i < y.length; i++ ) {
    if ( use[i] ) {
      result[k++] = y[i];
    }
  }
  return result;
}
origin: hibernate/hibernate-orm

private CacheableResultTransformer(boolean[] includeInTuple, boolean[] includeInTransform) {
  if ( includeInTuple == null ) {
    throw new IllegalArgumentException( "includeInTuple cannot be null" );
  }
  this.includeInTuple = includeInTuple;
  tupleLength = ArrayHelper.countTrue( includeInTuple );
  tupleSubsetLength = (
      includeInTransform == null ?
          tupleLength :
          ArrayHelper.countTrue( includeInTransform )
  );
  if ( tupleSubsetLength == tupleLength ) {
    includeInTransformIndex = null;
  }
  else {
    includeInTransformIndex = new int[tupleSubsetLength];
    for ( int i = 0, j = 0 ; i < includeInTransform.length ; i++ ) {
      if ( includeInTransform[ i ] ) {
        includeInTransformIndex[ j ] =  i;
        j++;
      }
    }
  }
}
origin: hibernate/hibernate-orm

/**
 * Write the element to a JDBC <tt>PreparedStatement</tt>
 */
protected int writeElement(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session)
    throws HibernateException, SQLException {
  getElementType().nullSafeSet( st, elt, i, elementColumnIsSettable, session );
  return i + ArrayHelper.countTrue( elementColumnIsSettable );
}
origin: hibernate/hibernate-orm

  throw new IllegalArgumentException( "transformer cannot be null" );
int tupleLength = ArrayHelper.countTrue( includeInTuple );
if ( aliases != null && aliases.length != tupleLength ) {
  throw new IllegalArgumentException(
origin: hibernate/hibernate-orm

/**
 * Write the index to a JDBC <tt>PreparedStatement</tt>
 */
protected int writeIndex(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session)
    throws HibernateException, SQLException {
  getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, indexColumnIsSettable, session );
  return i + ArrayHelper.countTrue( indexColumnIsSettable );
}
origin: hibernate/hibernate-orm

final int unquotedAffirmatives = ArrayHelper.countTrue(
    metaData.storesLowerCaseIdentifiers(),
    metaData.storesUpperCaseIdentifiers(),
final int quotedAffirmatives = ArrayHelper.countTrue(
    metaData.storesLowerCaseQuotedIdentifiers(),
    metaData.storesUpperCaseQuotedIdentifiers(),
origin: hibernate/hibernate-orm

System.arraycopy( settable, loc, subsettable, 0, len );
propertyTypes[i].nullSafeSet( st, subvalues[i], begin, subsettable, session );
begin += ArrayHelper.countTrue( subsettable );
origin: hibernate/hibernate-orm

    && !lobProperties.contains( i ) ) {
  getPropertyTypes()[i].nullSafeSet( ps, fields[i], index, includeColumns[i], session );
  index += ArrayHelper.countTrue( includeColumns[i] ); //TODO:  this is kinda slow...
if ( includeProperty[i] && isPropertyOfTable( i, j ) ) {
  getPropertyTypes()[i].nullSafeSet( ps, fields[i], index, includeColumns[i], session );
  index += ArrayHelper.countTrue( includeColumns[i] ); //TODO:  this is kinda slow...
origin: hibernate/hibernate-orm

public CriteriaLoader(
    final OuterJoinLoadable persister,
    final SessionFactoryImplementor factory,
    final CriteriaImpl criteria,
    final String rootEntityName,
    final LoadQueryInfluencers loadQueryInfluencers) throws HibernateException {
  super( factory, loadQueryInfluencers );
  translator = new CriteriaQueryTranslator(
      factory,
      criteria,
      rootEntityName,
      CriteriaQueryTranslator.ROOT_SQL_ALIAS
    );
  querySpaces = translator.getQuerySpaces();
  CriteriaJoinWalker walker = new CriteriaJoinWalker(
      persister,
      translator,
      factory,
      criteria,
      rootEntityName,
      loadQueryInfluencers
    );
  initFromWalker(walker);
  userAliases = walker.getUserAliases();
  resultTypes = walker.getResultTypes();
  includeInResultRow = walker.includeInResultRow();
  resultRowLength = ArrayHelper.countTrue( includeInResultRow );
  postInstantiate();
}
origin: hibernate/hibernate-orm

  SharedSessionContractImplementor session) {
if ( isInverse && hasIndex && !indexContainsFormula && ArrayHelper.countTrue( indexColumnIsSettable ) > 0 ) {
  try {
    if ( entries.hasNext() ) {
origin: hibernate/hibernate-orm

protected interface InclusionChecker {
  boolean includeProperty(int propertyNumber);
}
origin: org.hibernate/com.springsource.org.hibernate

public static String[] join(String[] x, String[] y, boolean[] use) {
  String[] result = new String[ x.length + countTrue(use) ];
  System.arraycopy( x, 0, result, 0, x.length );
  int k = x.length;
  for ( int i=0; i<y.length; i++ ) {
    if ( use[i] ) {
      result[k++] = y[i];
    }
  }
  return result;
}
origin: org.hibernate/com.springsource.org.hibernate.core

public static String[] join(String[] x, String[] y, boolean[] use) {
  String[] result = new String[ x.length + countTrue(use) ];
  System.arraycopy( x, 0, result, 0, x.length );
  int k = x.length;
  for ( int i=0; i<y.length; i++ ) {
    if ( use[i] ) {
      result[k++] = y[i];
    }
  }
  return result;
}
origin: org.hibernate.orm/hibernate-core

public static String[] join(String[] x, String[] y, boolean[] use) {
  String[] result = new String[x.length + countTrue( use )];
  System.arraycopy( x, 0, result, 0, x.length );
  int k = x.length;
  for ( int i = 0; i < y.length; i++ ) {
    if ( use[i] ) {
      result[k++] = y[i];
    }
  }
  return result;
}
origin: org.hibernate/com.springsource.org.hibernate

/**
 * Write the element to a JDBC <tt>PreparedStatement</tt>
 */
protected int writeElement(PreparedStatement st, Object elt, int i, SessionImplementor session)
    throws HibernateException, SQLException {
  getElementType().nullSafeSet( st, elt, i, elementColumnIsSettable, session );
  return i + ArrayHelper.countTrue( elementColumnIsSettable );
}
origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Write the element to a JDBC <tt>PreparedStatement</tt>
 */
protected int writeElement(PreparedStatement st, Object elt, int i, SessionImplementor session)
    throws HibernateException, SQLException {
  getElementType().nullSafeSet( st, elt, i, elementColumnIsSettable, session );
  return i + ArrayHelper.countTrue( elementColumnIsSettable );
}
origin: org.hibernate/com.springsource.org.hibernate

/**
 * Write the index to a JDBC <tt>PreparedStatement</tt>
 */
protected int writeIndex(PreparedStatement st, Object index, int i, SessionImplementor session)
    throws HibernateException, SQLException {
  getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, indexColumnIsSettable, session );
  return i + ArrayHelper.countTrue( indexColumnIsSettable );
}
origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Write the index to a JDBC <tt>PreparedStatement</tt>
 */
protected int writeIndex(PreparedStatement st, Object index, int i, SessionImplementor session)
    throws HibernateException, SQLException {
  getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, indexColumnIsSettable, session );
  return i + ArrayHelper.countTrue( indexColumnIsSettable );
}
origin: org.hibernate/com.springsource.org.hibernate

protected static interface InclusionChecker {
  public boolean includeProperty(int propertyNumber);
}
origin: org.hibernate/com.springsource.org.hibernate.core

protected static interface InclusionChecker {
  public boolean includeProperty(int propertyNumber);
}
org.hibernate.internal.util.collectionsArrayHelpercountTrue

Popular methods of ArrayHelper

  • fillArray
  • isAllFalse
  • join
  • getBatchSizes
  • getNextBatchSize
  • hash
    calculate the array hash (only the first level)
  • indexOf
  • toIntArray
  • toString
  • toStringArray
  • addAll
  • countNonNull
  • addAll,
  • countNonNull,
  • isAllNegative,
  • slice,
  • to2DIntArray,
  • to2DStringArray,
  • toBooleanArray,
  • toList,
  • toTypeArray

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for Android Studio
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