Tabnine Logo
CompoundIndexes
Code IndexAdd Tabnine to your IDE (free)

How to use
CompoundIndexes
in
org.springframework.data.mongodb.core.index

Best Java code snippets using org.springframework.data.mongodb.core.index.CompoundIndexes (Showing top 20 results out of 315)

origin: spring-projects/spring-data-mongodb

/**
 * Create {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} for {@link CompoundIndexes} of given type.
 *
 * @param dotPath The properties {@literal "dot"} path representation from its document root.
 * @param fallbackCollection
 * @param type
 * @return
 */
protected List<IndexDefinitionHolder> createCompoundIndexDefinitions(String dotPath, String fallbackCollection,
    MongoPersistentEntity<?> entity) {
  List<IndexDefinitionHolder> indexDefinitions = new ArrayList<>();
  CompoundIndexes indexes = entity.findAnnotation(CompoundIndexes.class);
  if (indexes != null) {
    indexDefinitions = Arrays.stream(indexes.value())
        .map(index -> createCompoundIndexDefinition(dotPath, fallbackCollection, index, entity))
        .collect(Collectors.toList());
  }
  CompoundIndex index = entity.findAnnotation(CompoundIndex.class);
  if (index != null) {
    indexDefinitions.add(createCompoundIndexDefinition(dotPath, fallbackCollection, index, entity));
  }
  return indexDefinitions;
}
origin: pl.edu.icm.polindex/polindex-core

@CompoundIndexes({
  @CompoundIndex(name="tags_creationDate_idx",
          def = "{ 'tags' : 1, 'object.creationDate' : -1}")
})
public class ImportRecord extends TaggedObjectRecord<ImportInfo> {

  // Important: constructor parameter must match field name from TaggedObjectRecord
  // in order to be properly mapped by spring data mongo
  public ImportRecord(ImportInfo object, Collection<? extends Tag> tags) {
    super(object, tags);
  }

}

origin: pl.edu.icm.polindex/polindex-core

/**
 * Mongo Journal record.
 * 
 * @author whury
 */
@CompoundIndexes({
  @CompoundIndex(name="dirty_idx",
          def = "{ 'dirty' : 1, 'dirtyDate' : 1}")
})
public class JournalRecord extends DirtyableEntityRecord<Journal> {

  public JournalRecord(Journal object, Collection<? extends Tag> tags) {
    super(object, tags);
  }

}

origin: pl.edu.icm.polindex/polindex-core

/**
 * Mongo resolved citation record.
 * @author whury
 */
@CompoundIndexes({
    @CompoundIndex(name="citation_key",
        def = "{ 'object.sourceArticle.articleId' : 1, 'object.citationIndex' : 1}",
        unique = true)
})
public class ResolvedCitationRecord extends EntityRecord<ResolvedCitation> {

  public ResolvedCitationRecord(ResolvedCitation object, Collection<? extends Tag> tags) {
    super(object, tags);
  }

}

origin: org.springframework.data/spring-data-mongodb

/**
 * Create {@link IndexDefinition} wrapped in {@link IndexDefinitionHolder} for {@link CompoundIndexes} of given type.
 *
 * @param dotPath The properties {@literal "dot"} path representation from its document root.
 * @param fallbackCollection
 * @param type
 * @return
 */
protected List<IndexDefinitionHolder> createCompoundIndexDefinitions(String dotPath, String fallbackCollection,
    MongoPersistentEntity<?> entity) {
  List<IndexDefinitionHolder> indexDefinitions = new ArrayList<>();
  CompoundIndexes indexes = entity.findAnnotation(CompoundIndexes.class);
  if (indexes != null) {
    indexDefinitions = Arrays.stream(indexes.value())
        .map(index -> createCompoundIndexDefinition(dotPath, fallbackCollection, index, entity))
        .collect(Collectors.toList());
  }
  CompoundIndex index = entity.findAnnotation(CompoundIndex.class);
  if (index != null) {
    indexDefinitions.add(createCompoundIndexDefinition(dotPath, fallbackCollection, index, entity));
  }
  return indexDefinitions;
}
origin: de.adorsys.multibanking/multibanking-pers-spi

/**
 * Created by alexg on 01.12.17.
 */
@Data
@Document
@CompoundIndexes({
    @CompoundIndex(name = "creditor_unique_index", def = "{'creditorId': 1}", unique = true)
})
public class AnonymizedBookingEntity {

  private String creditorId;
  private BigDecimal amount;
  private String purpose;
}

origin: de.adorsys.multibanking/multibanking-pers-spi

/**
 * Created by alexg on 08.05.17.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Document
@CompoundIndexes({
    @CompoundIndex(name = "bank_index", def = "{'bankCode': 1}")
})
public class BankEntity extends Bank {

  @Id
  private String id;
  private String blzHbci;
  
  @Indexed
  private List<String> searchIndex;

}

origin: de.adorsys.multibanking/multibanking-pers-spi

/**
 * Created by alexg on 05.09.17.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Document
@Encrypted(exclude = {"_id", "accountId", "userId"})
@CompoundIndexes({
    @CompoundIndex(name = "account_index", def = "{'userId': 1, 'accountId': 1}")
})
public class StandingOrderEntity extends StandingOrder {

  @Id
  private String id;
  private String accountId;
  private String userId;
  private Object tanSubmitExternal;

}

origin: de.adorsys.multibanking/multibanking-pers-spi

/**
 * Created by alexg on 08.05.17.
 */
@Data
@Document
@Encrypted(exclude = {"_id", "accountId", "userId", "analyticsDate"})
@CompoundIndexes({
    @CompoundIndex(name = "account_index", def = "{'userId': 1, 'accountId': 1}")
})
public class AccountAnalyticsEntity {

  @Id
  private String id;
  private String accountId;
  private String userId;

  private LocalDateTime analyticsDate = LocalDateTime.now().now();

  private List<BookingGroup> bookingGroups;

}

origin: de.adorsys.multibanking/multibanking-pers-spi

@Encrypted(exclude = {"_id", "bankAccessId", "userId", "syncStatus", "rulesVersion"})
@JsonIgnoreProperties(value = {"externalIdMap"}, allowSetters = true)
@CompoundIndexes({
    @CompoundIndex(name = "account_index", def = "{'userId': 1, 'bankAccessId': 1}")
})
origin: pl.edu.icm.polindex/polindex-core

@CompoundIndexes({
  @CompoundIndex(name="tags_timestamp_idx",
          def = "{ 'tags' : 1, 'object.timestamp' : 1}"),
  @CompoundIndex(name="tags_timestamp_severity_idx",
          def = "{ 'tags' : 1, 'object.timestamp' : 1, 'severityLevel' : 1 }")
})
public class EventRecord extends TaggedObjectRecord<Event> {
  
  // we need range queries on severity level and so
  // standard tag mechanism is not enough
  private final int severityLevel;

  public EventRecord(Event object, Collection<? extends Tag> tags) {
    super(object, tags);
    this.severityLevel = object.getCode().getSeverity().getSeverity();
  }
  
  public int getSeverityLevel() {
    return severityLevel;
  }
  
}

origin: com.jtbdevelopment.core-common/core-spring-web-mongo

@CompoundIndexes({@CompoundIndex(name = "series", unique = true, def = "{'series':1}")})
public class MongoRememberMeToken extends AbstractRememberMeToken<ObjectId> {
origin: de.adorsys.multibanking/multibanking-pers-spi

/**
 * Created by alexg on 07.02.17.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Document
@Encrypted(exclude = {"_id", "accountId", "userId", "analyticsDate"})
@CompoundIndexes({
    @CompoundIndex(name = "account_index", def = "{'userId': 1, 'accountId': 1}")
})
public class ContractEntity extends Contract {

  @Id
  private String id;
  private String userId;
  private String accountId;
  private BigDecimal amount;
  private String mainCategory;
  private String subCategory;
  private String specification;
  private String provider;

}

origin: de.adorsys.multibanking/multibanking-pers-spi

/**
 * Created by alexg on 07.02.17.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Document
@CompoundIndexes({
    @CompoundIndex(name = "booking_index", def = "{'userId': 1, 'accountId': 1}"),
    @CompoundIndex(name = "booking_unique_index", def = "{'externalId': 1, 'accountId': 1}", unique = true)})
@Encrypted(exclude = {"_id", "accountId", "externalId", "userId", "valutaDate", "bookingDate", "bankApi"})
public class BookingEntity extends Booking {

  @Id
  private String id;
  private String accountId;
  private String userId;

}

origin: com.jtbdevelopment.core-games/games-mongo

@CompoundIndexes({@CompoundIndex(name = "created", def = "{'created': 1}"),
  @CompoundIndex(name = "lastUpdated", def = "{'lastUpdate': 1}")})
public abstract class AbstractMongoMultiPlayerGame<FEATURES> extends
origin: com.jtbdevelopment.core-games/games-mongo

@CompoundIndexes({@CompoundIndex(name = "created", def = "{'created': 1}"),
  @CompoundIndex(name = "lastUpdated", def = "{'lastUpdate': 1}")})
public abstract class AbstractMongoSinglePlayerGame<FEATURES> extends
origin: com.jtbdevelopment.core-common/core-spring-web-mongo

/**
 * Date: 12/16/14 Time: 1:04 PM
 */
@Document(collection = "socialConnections")
@CompoundIndexes({
  @CompoundIndex(name = "sc_uidpidc", unique = true, def = "{'userId': 1, 'providerId': 1, 'created': 1}"),
  @CompoundIndex(name = "sc_pk", unique = true, def = "{'userId': 1, 'providerId': 1, 'providerUserId': 1}")})
public class MongoSocialConnection extends AbstractSocialConnection<ObjectId> {

 @Id
 private ObjectId id;

 public ObjectId getId() {
  return id;
 }

 public void setId(ObjectId id) {
  this.id = id;
 }
}

origin: pl.edu.icm.polindex/polindex-core

@CompoundIndexes({
  @CompoundIndex(name="dirty_idx",
          def = "{ 'dirty' : 1, 'dirtyDate' : 1}")
origin: de.adorsys.multibanking/multibanking-pers-spi

@Document
@Encrypted(exclude = {"_id", "accountId", "userId"})
@CompoundIndexes({
    @CompoundIndex(name = "account_index", def = "{'userId': 1, 'accountId': 1}")
})
origin: Loki-Afro/multi-tenant-spring-mongodb

@CompoundIndexes({
    @CompoundIndex(name = "primary_index", collection = "person", def = "{'name': 1, 'surname': 1}")
})
org.springframework.data.mongodb.core.indexCompoundIndexes

Most used methods

  • <init>
  • value

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Menu (java.awt)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • CodeWhisperer alternatives
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