Tabnine Logo
ForeignKey.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
android.arch.persistence.room.ForeignKey
constructor

Best Java code snippets using android.arch.persistence.room.ForeignKey.<init> (Showing top 20 results out of 315)

origin: TeamNewPipe/NewPipe

@Entity(tableName = STREAM_STATE_TABLE,
    primaryKeys = {JOIN_STREAM_ID},
    foreignKeys = {
        @ForeignKey(entity = StreamEntity.class,
            parentColumns = StreamEntity.STREAM_ID,
            childColumns = JOIN_STREAM_ID,
origin: TeamNewPipe/NewPipe

},
foreignKeys = {
    @ForeignKey(entity = PlaylistEntity.class,
        parentColumns = PlaylistEntity.PLAYLIST_ID,
        childColumns = JOIN_PLAYLIST_ID,
        onDelete = CASCADE, onUpdate = CASCADE, deferred = true),
    @ForeignKey(entity = StreamEntity.class,
        parentColumns = StreamEntity.STREAM_ID,
        childColumns = JOIN_STREAM_ID,
origin: TeamNewPipe/NewPipe

@ForeignKey(entity = StreamEntity.class,
    parentColumns = StreamEntity.STREAM_ID,
    childColumns = JOIN_STREAM_ID,
origin: googlesamples/android-AutofillFramework

@Entity(primaryKeys = {"autofillHint"}, foreignKeys = @ForeignKey(
    entity = FieldType.class, parentColumns = "typeName", childColumns = "fieldTypeName",
    onDelete = ForeignKey.CASCADE))
public class AutofillHint {

  @NonNull
  @ColumnInfo(name = "autofillHint")
  public String mAutofillHint;

  @NonNull
  @ColumnInfo(name = "fieldTypeName")
  public String mFieldTypeName;

  public AutofillHint(@NonNull String autofillHint, @NonNull String fieldTypeName) {
    this.mAutofillHint = autofillHint;
    this.mFieldTypeName = fieldTypeName;
  }
}

origin: googlesamples/android-AutofillFramework

@Entity(primaryKeys = {"resourceIdHeuristic", "packageName"}, foreignKeys = @ForeignKey(
    entity = FieldType.class, parentColumns = "typeName", childColumns = "fieldTypeName",
    onDelete = ForeignKey.CASCADE))
public class ResourceIdHeuristic {

  @NonNull
  @ColumnInfo(name = "resourceIdHeuristic")
  public String mResourceIdHeuristic;

  @NonNull
  @ColumnInfo(name = "packageName")
  public String mPackageName;

  @NonNull
  @ColumnInfo(name = "fieldTypeName")
  public String mFieldTypeName;

  public ResourceIdHeuristic(@NonNull String resourceIdHeuristic, @NonNull String fieldTypeName,
      @NonNull String packageName) {
    mResourceIdHeuristic = resourceIdHeuristic;
    mFieldTypeName = fieldTypeName;
    mPackageName = packageName;
  }
}

origin: commonsguy/cw-androidarch

@Entity(tableName="paragraphs",
 foreignKeys=@ForeignKey(entity=ChapterEntity.class, parentColumns="id",
  childColumns="chapterId", onDelete=ForeignKey.CASCADE),
 indices={@Index(value="chapterId")})
public class ParagraphEntity {
 @PrimaryKey
 long sequence;
 String prose;
 long chapterId;

 ParagraphEntity(String prose) {
  this.prose=prose;
 }
}

origin: vogellacompany/codeexamples-android

@Entity(tableName = "trophy",
    foreignKeys = {
        @ForeignKey(
            entity = User.class,
            parentColumns = "id",
            childColumns = "userId",
            onDelete = ForeignKey.CASCADE
        )},
    indices = { @Index(value = "userId")}
)
public class Trophy {

  @PrimaryKey(autoGenerate = true)
  long id;

  public long userId;

  String description;

  public Trophy(long userId, String description) {
    this.userId = userId;
    this.description = description;
  }
}

origin: commonsguy/cw-androidarch

@Entity(
 tableName="lodgings",
 foreignKeys=@ForeignKey(
  entity=Trip.class,
  parentColumns="id",
  childColumns="tripId",
  onDelete=CASCADE),
 indices=@Index("tripId"))
@TypeConverters({TypeTransmogrifier.class})
class Lodging extends Plan {
 public final String address;
 public final String tripId;

 @Ignore
 Lodging(String title, int duration, Priority priority, Date startTime,
     String address, String tripId) {
  super(title, duration, priority, startTime);
  this.address=address;
  this.tripId=tripId;
 }

 Lodging(String id, String title, int duration,
     Priority priority, Date startTime, Date creationTime,
     Date updateTime, String address, String tripId) {
  super(id, title, duration, priority, startTime, creationTime, updateTime);
  this.address=address;
  this.tripId=tripId;
 }
}

origin: commonsguy/cw-androidarch

@Entity(
 tableName="lodgings",
 foreignKeys=@ForeignKey(
  entity=Trip.class,
  parentColumns="id",
  childColumns="tripId",
  onDelete=CASCADE),
 indices=@Index("tripId"))
@TypeConverters({TypeTransmogrifier.class})
class Lodging extends Plan {
 public final String address;
 public final String tripId;

 @Ignore
 Lodging(String title, int duration, Priority priority, Date startTime,
     String address, String tripId) {
  super(title, duration, priority, startTime);
  this.address=address;
  this.tripId=tripId;
 }

 Lodging(String id, String title, int duration,
     Priority priority, Date startTime, Date creationTime,
     Date updateTime, String address, String tripId) {
  super(id, title, duration, priority, startTime, creationTime, updateTime);
  this.address=address;
  this.tripId=tripId;
 }
}

origin: commonsguy/cw-androidarch

@Entity(
 tableName="lodgings",
 foreignKeys=@ForeignKey(
  entity=Trip.class,
  parentColumns="id",
  childColumns="tripId",
  onDelete=CASCADE),
 indices=@Index("tripId"))
@TypeConverters({TypeTransmogrifier.class})
class Lodging extends Plan {
 public final String address;
 public final String tripId;

 @Ignore
 Lodging(String title, int duration, Priority priority, Date startTime,
     String address, String tripId) {
  super(title, duration, priority, startTime);
  this.address=address;
  this.tripId=tripId;
 }

 Lodging(String id, String title, int duration,
     Priority priority, Date startTime, Date creationTime,
     Date updateTime, String address, String tripId) {
  super(id, title, duration, priority, startTime, creationTime, updateTime);
  this.address=address;
  this.tripId=tripId;
 }
}

origin: commonsguy/cw-androidarch

@Entity(
 tableName="lodgings",
 foreignKeys=@ForeignKey(
  entity=Trip.class,
  parentColumns="id",
  childColumns="tripId",
  onDelete=CASCADE),
 indices=@Index("tripId"))
@TypeConverters({TypeTransmogrifier.class})
class Lodging extends Plan {
 public final String address;
 public final String tripId;

 @Ignore
 Lodging(String title, int duration, Priority priority, Date startTime,
     String address, String tripId) {
  super(title, duration, priority, startTime);
  this.address=address;
  this.tripId=tripId;
 }

 Lodging(String id, String title, int duration,
     Priority priority, Date startTime, Date creationTime,
     Date updateTime, String address, String tripId) {
  super(id, title, duration, priority, startTime, creationTime, updateTime);
  this.address=address;
  this.tripId=tripId;
 }
}

origin: commonsguy/cw-androidarch

@Entity(
 tableName="lodgings",
 foreignKeys=@ForeignKey(
  entity=Trip.class,
  parentColumns="id",
  childColumns="tripId",
  onDelete=CASCADE),
 indices=@Index("tripId"))
@TypeConverters({TypeTransmogrifier.class})
class Lodging extends Plan {
 public final String address;
 public final String tripId;

 @Ignore
 Lodging(String title, int duration, Priority priority, Date startTime,
     String address, String tripId) {
  super(title, duration, priority, startTime);
  this.address=address;
  this.tripId=tripId;
 }

 Lodging(String id, String title, int duration,
     Priority priority, Date startTime, Date creationTime,
     Date updateTime, String address, String tripId) {
  super(id, title, duration, priority, startTime, creationTime, updateTime);
  this.address=address;
  this.tripId=tripId;
 }
}

origin: commonsguy/cw-androidarch

@Entity(
 tableName="lodgings",
 foreignKeys=@ForeignKey(
  entity=Trip.class,
  parentColumns="id",
  childColumns="tripId",
  onDelete=CASCADE),
 indices=@Index("tripId"))
@TypeConverters({TypeTransmogrifier.class})
class Lodging extends Plan {
 public final String address;
 public final String tripId;

 @Ignore
 Lodging(String title, int duration, Priority priority, Date startTime,
     String address, String tripId) {
  super(title, duration, priority, startTime);
  this.address=address;
  this.tripId=tripId;
 }

 Lodging(String id, String title, int duration,
     Priority priority, Date startTime, Date creationTime,
     Date updateTime, String address, String tripId) {
  super(id, title, duration, priority, startTime, creationTime, updateTime);
  this.address=address;
  this.tripId=tripId;
 }
}

origin: GoldenKappa/notSABS

@Entity(
    tableName = "DisabledPackage",
    indices = {@Index(value = {"packageName", "policyPackageId"}, unique = true)},
    foreignKeys = @ForeignKey(entity = PolicyPackage.class,
        parentColumns = "id",
        childColumns = "policyPackageId")
)
public class DisabledPackage {

  @PrimaryKey(autoGenerate = true)
  @ColumnInfo(name = "id")
  public long id;

  @ColumnInfo(name = "packageName")
  public String packageName;

  @ColumnInfo(name = "policyPackageId")
  public String policyPackageId;

}

origin: GoldenKappa/notSABS

@Entity(
    tableName = "FirewallWhitelistedPackage",
    indices = {@Index(value = {"packageName", "policyPackageId"}, unique = true)},
    foreignKeys = @ForeignKey(entity = PolicyPackage.class,
        parentColumns = "id",
        childColumns = "policyPackageId")
)
public class FirewallWhitelistedPackage {

  @PrimaryKey(autoGenerate = true)
  @ColumnInfo(name = "id")
  public long id;

  @ColumnInfo(name = "packageName")
  public String packageName;

  @ColumnInfo(name = "policyPackageId")
  public String policyPackageId;

  public FirewallWhitelistedPackage() {
  }

  @Ignore
  public FirewallWhitelistedPackage(String packageName, String policyPackageId) {
    this.packageName = packageName;
    this.policyPackageId = policyPackageId;
  }

}

origin: GoldenKappa/notSABS

@Entity(
    tableName = "BlockUrl",
    foreignKeys = @ForeignKey(
        entity = BlockUrlProvider.class,
        parentColumns = "_id",
        childColumns = "urlProviderId",
        onDelete = ForeignKey.CASCADE
    ),
    indices = {@Index(value = {"url", "urlProviderId"}, unique = true)}
)
public class BlockUrl {
  @PrimaryKey(autoGenerate = true)
  @ColumnInfo(name = "_id")
  public long id;

  @ColumnInfo(name = "url")
  public String url;

  @ColumnInfo(name = "urlProviderId")
  public long urlProviderId;

  public BlockUrl(String url, long urlProviderId) {
    this.url = url;
    this.urlProviderId = urlProviderId;
  }
}

origin: GoldenKappa/notSABS

@Entity(
    tableName = "WhiteUrl",
    indices = {@Index(value = {"url"}, unique = true)},
    foreignKeys = @ForeignKey(entity = PolicyPackage.class,
        parentColumns = "id",
        childColumns = "policyPackageId")
origin: GoldenKappa/notSABS

@Entity(
    tableName = "UserBlockUrl",
    indices = {@Index(value = {"url"}, unique = true)},
    foreignKeys = @ForeignKey(entity = PolicyPackage.class,
        parentColumns = "id",
        childColumns = "policyPackageId")
origin: GoldenKappa/notSABS

@Entity(tableName = "BlockUrlProviders",
    indices = {@Index(value = {"url"}, unique = true)},
    foreignKeys = @ForeignKey(entity = PolicyPackage.class,
        parentColumns = "id",
        childColumns = "policyPackageId"))
@TypeConverters(DateConverter.class)
public class BlockUrlProvider {
  @PrimaryKey(autoGenerate = true)
  @ColumnInfo(name = "_id")
  public long id;

  @ColumnInfo(name = "url")
  public String url;

  @ColumnInfo(name = "count")
  public int count;

  @ColumnInfo(name = "lastUpdated")
  public Date lastUpdated;

  @ColumnInfo(name = "deletable")
  public boolean deletable;

  @ColumnInfo(name = "selected")
  public boolean selected;

  @ColumnInfo(name = "policyPackageId")
  public String policyPackageId;
}

origin: GoldenKappa/notSABS

@Entity(
    tableName = "AppPermission",
    indices = {@Index(value = {"packageName", "permissionName", "policyPackageId"}, unique = true)},
    foreignKeys = @ForeignKey(entity = PolicyPackage.class,
        parentColumns = "id",
        childColumns = "policyPackageId")
android.arch.persistence.roomForeignKey<init>

Popular methods of ForeignKey

    Popular in Java

    • Making http requests using okhttp
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • getContentResolver (Context)
    • getResourceAsStream (ClassLoader)
    • ObjectMapper (com.fasterxml.jackson.databind)
      ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
    • MalformedURLException (java.net)
      This exception is thrown when a program attempts to create an URL from an incorrect specification.
    • Proxy (java.net)
      This class represents proxy server settings. A created instance of Proxy stores a type and an addres
    • Selector (java.nio.channels)
      A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
    • StringUtils (org.apache.commons.lang)
      Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
    • DateTimeFormat (org.joda.time.format)
      Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
    • Github Copilot 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