Example usage for java.lang Integer MAX_VALUE

List of usage examples for java.lang Integer MAX_VALUE

Introduction

In this page you can find the example usage for java.lang Integer MAX_VALUE.

Prototype

int MAX_VALUE

To view the source code for java.lang Integer MAX_VALUE.

Click Source Link

Document

A constant holding the maximum value an int can have, 231-1.

Usage

From source file:adalid.core.ReportGroup.java

private ReportGroup(Report report) {
    super();//from   w w  w.j  a  v  a 2s. c om
    ReportGroup group = this;
    if (report != null) {
        _report = report;
        _sequence = Integer.MAX_VALUE;
        _detail = true;
        PersistentEntity entity = report.getEntity();
        if (entity != null) {
            QueryTable queryTable = entity.getQueryTable();
            if (queryTable != null) {
                Entity e;
                Property p;
                ReportField field;
                List<Property> columns = entity.getDataProviderColumnsList();
                if (columns != null && !columns.isEmpty()) {
                    for (Property column : columns) {
                        if (column.isHiddenField() || !column.isReportField()) {
                            continue;
                        }
                        if (column instanceof Entity) {
                            e = (Entity) column;
                            p = e.getBusinessKeyProperty();
                            if (p != null && p.isReportField() && queryTable.contains(p)) {
                                field = ReportField.addReportField(group, p);
                                field.setParentProperty(column);
                            }
                            if (column instanceof EnumerationEntity) {
                            } else {
                                p = e.getNameProperty();
                                if (p != null && p.isReportField() && queryTable.contains(p)) {
                                    field = ReportField.addReportField(group, p);
                                    field.setParentProperty(column);
                                }
                            }
                        } else if (column instanceof BinaryPrimitive) {
                        } else if (column instanceof Primitive) {
                            if (column.isReportField()) {
                                field = ReportField.addReportField(group, column);
                                field.setParentProperty(null);
                            }
                        }
                    }
                }
            }
        }
        setDeclared("detailGroup");
        add();
    }
}

From source file:com.epam.ta.reportportal.core.widget.content.UniqueBugContentLoader.java

@Override
public Map<String, List<ChartObject>> loadContent(Filter filter, Sort sorting, int quantity,
        List<String> contentFields, List<String> metaDataFields, Map<String, List<String>> options) {

    UniqueBugDocumentHandler uniqueBugDocumentHandler = new UniqueBugDocumentHandler();

    testItemRepository.loadWithCallback(filter, sorting, Integer.MAX_VALUE, Arrays.asList(META_DATA_FIELDS),
            uniqueBugDocumentHandler, COLLECTION_NAME);
    return uniqueBugDocumentHandler.getResult();
}

From source file:it.drwolf.ridire.session.async.callable.CorpusDeleter.java

public IndexingResult call() {
    IndexingResult indexingResult = new IndexingResult();
    Lifecycle.beginCall();/* w ww .  java  2  s.co  m*/
    try {
        this.contextsIndexManager = (ContextsIndexManager) Component.getInstance("contextsIndexManager");
        TopDocs termDocs = null;
        int updated = 0;
        int totToBeModified = 0;
        this.contextsIndexManager.reOpenIndexReaderW();
        termDocs = this.contextsIndexManager.getIndexSearcherW()
                .search(new TermQuery(new Term("corpus", this.corpusName)), Integer.MAX_VALUE);
        totToBeModified = termDocs.totalHits;
        for (int i = 0; i < termDocs.totalHits; i += 30) {
            ScoreDoc[] tmp = (ScoreDoc[]) ArrayUtils.subarray(termDocs.scoreDocs, i, i + 30);
            for (ScoreDoc scoreDoc : tmp) {
                this.contextsIndexManager.reOpenIndexReaderW();
                Document d = this.contextsIndexManager.getIndexSearcherW().doc(scoreDoc.doc);
                List<String> corporaNames = new ArrayList<String>();
                for (String cn : d.getValues("corpus")) {
                    if (!cn.equals(this.corpusName)) {
                        corporaNames.add(cn);
                    }
                }
                d.removeFields("corpus");
                if (corporaNames.size() > 0) {
                    for (String cn : corporaNames) {
                        d.add(new Field("corpus", cn, Field.Store.YES, Field.Index.NOT_ANALYZED));
                    }
                }
                try {
                    this.contextsIndexManager.closeIndexWriter();
                    this.contextsIndexManager.getIndexSearcherW().getIndexReader().deleteDocument(scoreDoc.doc);
                    this.contextsIndexManager.getIndexSearcherW().getIndexReader().close();
                    this.contextsIndexManager.openIndexWriterWithoutCreating();
                    this.contextsIndexManager.getIndexWriter().updateDocument(new Term("corpus"), d);
                    this.contextsIndexManager.closeIndexWriter();
                } catch (RuntimeException e) {
                    e.printStackTrace();
                    throw e;
                }
                ++updated;
                this.percentage = updated / (totToBeModified * 1.0f);
            }
        }
        this.contextsIndexManager.openIndexWriterWithoutCreating();
        this.contextsIndexManager.getIndexWriter().expungeDeletes();
        this.contextsIndexManager.closeIndexWriter();
    } catch (Exception e) {
        e.printStackTrace();
    }
    Lifecycle.endCall();
    this.setTerminated(true);
    return indexingResult;
}

From source file:com.hp.autonomy.frontend.find.idol.search.IdolRelatedConceptsServiceIT.java

@Test
public void findRelatedConceptsWithStateToken() throws Exception {
    final QueryRestrictions<String> queryRestrictions = queryRestrictionsBuilder.setQueryText("*")
            .setFieldText("").setDatabases(Arrays.asList(mvcIntegrationTestUtils.getDatabases())).setMinScore(0)
            .build();//  www.  j a  v  a2s  . co m

    final String stateToken = documentsService.getStateToken(queryRestrictions, Integer.MAX_VALUE, false);

    final MockHttpServletRequestBuilder request = get(RelatedConceptsController.RELATED_CONCEPTS_PATH)
            .param(RelatedConceptsController.DATABASES_PARAM, mvcIntegrationTestUtils.getDatabases())
            .param(RelatedConceptsController.QUERY_TEXT_PARAM, "*")
            .param(RelatedConceptsController.FIELD_TEXT_PARAM, "")
            .param(RelatedConceptsController.STATE_TOKEN_PARAM, stateToken).with(authentication(userAuth()));

    mockMvc.perform(request).andExpect(status().isOk())
            .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
            .andExpect(jsonPath("$", not(empty())));
}

From source file:de.blizzy.backup.Utils.java

public static String createSampleBackupFilePath() {
    return BACKUP_PATH_FORMAT.format(new Date()) + "/" + toBackupFileName(Integer.MAX_VALUE); //$NON-NLS-1$
}

From source file:io.fluo.stress.TrieBasicIT.java

@Test
public void testBit4() throws Exception {
    runTrieTest(10, Integer.MAX_VALUE, 4);
}

From source file:org.biopax.validator.rules.BindingFeatureExtraRules.java

public void check(final Validation validation, Model model) {
    Set<BindingFeature> bfs = new HashSet<BindingFeature>(model.getObjects(BindingFeature.class));

    Cluster<BindingFeature> groupping = new Cluster<BindingFeature>() {
        @Override/*from   w  w  w .  j  ava  2  s  . c  om*/
        public boolean match(BindingFeature a, BindingFeature b) {
            boolean ab = a.getBindsTo() != null && b.getBindsTo() != null
                    && a.getBindsTo().isEquivalent(b.getBindsTo());

            return !a.isEquivalent(b) && ab;
        }
    };

    Set<Set<BindingFeature>> violations = groupping.cluster(bfs, Integer.MAX_VALUE);

    // report the error once for each cluster >1
    for (Set<BindingFeature> s : violations) {
        if (s.size() > 1) {
            BindingFeature a = s.iterator().next();
            error(validation, a, "inverse.functional.violated", false, "bindsTo", a.getBindsTo(), s);
        }
    }
}

From source file:com.shishu.utility.string.StringUtil.java

/**
 * Convenience call for {@link #toHexString(byte[], String, int)}, where
 * <code>sep = null; lineLen = Integer.MAX_VALUE</code>.
 * //from   ww w . j a  v a2s  . c om
 * @param buf
 */
public static String toHexString(byte[] buf) {
    return toHexString(buf, null, Integer.MAX_VALUE);
}

From source file:com.redhat.lightblue.metadata.types.IntegerTypeTest.java

@Test
public void testFromJson() {
    JsonNode jsonNode = JsonNodeFactory.withExactBigDecimals(false).numberNode(Integer.MAX_VALUE);
    Object fromJson = integerType.fromJson(jsonNode);
    assertTrue(fromJson instanceof Long);
}