Top Inners Fields Constructors Methods
org.jooq.impl

pack-priv final Class VersionImpl

extends AbstractNode<Version>
implements Version
Class Inheritance
All Implemented Interfaces
org.jooq.Version, org.jooq.Node
Static Imports
java.lang.Boolean.TRUE, java.util.Collections.emptyList, .Collections.unmodifiableList, org.jooq.impl.DSL.createSchema, .DSL.name, .DSL.schema, .Tools.anyMatch, .Tools.map

Author
Lukas Eder

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Modifier and TypeField and Description
private final DSLContext
private final Meta
private final List<VersionImpl.Parent>

Constructor Summary

AccessConstructor and Description
private
pack-priv
VersionImpl(DSLContext ctx, String id, Meta meta, Version parent, Queries queries)

pack-priv
VersionImpl(DSLContext ctx, String id, Meta meta, Version[] parents)

Method Summary

Modifier and TypeMethod and Description
public final Version
apply(String newId, Query... migration)

Implements org.jooq.Version.apply.

Apply a migration to produce a new version.
public final Version
apply(String newId, Collection<? extends Query> migration)

Implements org.jooq.Version.apply.

Apply a migration to produce a new version.
public final Version
apply(String newId, String migration)

Implements org.jooq.Version.apply.

Apply a migration to produce a new version.
public final Version
apply(String newId, Queries migration)

Implements org.jooq.Version.apply.

Apply a migration to produce a new version.
public final Version
commit(String newId, String... newMeta)

Implements org.jooq.Version.commit.

Commit a new Meta representation to the version graph.
public final Version
commit(String newId, Source... newMeta)

Implements org.jooq.Version.commit.

Commit a new Meta representation to the version graph.
public final Version
commit(String newId, Meta newMeta)

Implements org.jooq.Version.commit.

Commit a new Meta representation to the version graph.
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
private final boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private static final Meta
public final Version
merge(String newId, Version with)

Implements org.jooq.Version.merge.

Merge versions.
public final Meta
meta()

Implements org.jooq.Version.meta.

The version's Meta representation of the database.
public final Queries
migrateTo(Version version)

Implements org.jooq.Version.migrateTo.

Produce a migration to a new version.
private final Queries
migrateTo(VersionImpl target, Queries result)

public final List<Version>
parents()

Implements org.jooq.Node.parents.

The parents of this node.
private final VersionImpl
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
private static List<VersionImpl.Parent>
wrap(Version[] parents)

Inherited from org.jooq.impl.AbstractNode:
commonAncestoridmessageroot

Field Detail

ctxback to summary
private final DSLContext ctx
metaback to summary
private final Meta meta
parentsback to summary
private final List<VersionImpl.Parent> parents

Constructor Detail

VersionImplback to summary
private VersionImpl(DSLContext ctx, String id, Meta meta, List<VersionImpl.Parent> parents)
VersionImplback to summary
pack-priv VersionImpl(DSLContext ctx, String id, Meta meta, Version parent, Queries queries)
VersionImplback to summary
pack-priv VersionImpl(DSLContext ctx, String id, Meta meta, Version[] parents)

Method Detail

applyback to summary
public final Version apply(String newId, Query... migration)

Implements org.jooq.Version.apply.

Doc from org.jooq.Version.apply.

Apply a migration to produce a new version.

Annotations
@Override
applyback to summary
public final Version apply(String newId, Collection<? extends Query> migration)

Implements org.jooq.Version.apply.

Doc from org.jooq.Version.apply.

Apply a migration to produce a new version.

Annotations
@Override
applyback to summary
public final Version apply(String newId, String migration)

Implements org.jooq.Version.apply.

Doc from org.jooq.Version.apply.

Apply a migration to produce a new version.

Annotations
@Override
applyback to summary
public final Version apply(String newId, Queries migration)

Implements org.jooq.Version.apply.

Doc from org.jooq.Version.apply.

Apply a migration to produce a new version.

Annotations
@Override
commitback to summary
public final Version commit(String newId, String... newMeta)

Implements org.jooq.Version.commit.

Doc from org.jooq.Version.commit.

Commit a new Meta representation to the version graph.

Annotations
@Override
commitback to summary
public final Version commit(String newId, Source... newMeta)

Implements org.jooq.Version.commit.

Doc from org.jooq.Version.commit.

Commit a new Meta representation to the version graph.

Annotations
@Override
commitback to summary
public final Version commit(String newId, Meta newMeta)

Implements org.jooq.Version.commit.

Doc from org.jooq.Version.commit.

Commit a new Meta representation to the version graph.

This calculates a migration path using Meta#migrateTo(Meta).

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
forceApplyback to summary
private final boolean forceApply()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
initback to summary
private static final Meta init(DSLContext ctx)
mergeback to summary
public final Version merge(String newId, Version with)

Implements org.jooq.Version.merge.

Doc from org.jooq.Version.merge.

Merge versions.

Annotations
@Override
metaback to summary
public final Meta meta()

Implements org.jooq.Version.meta.

Doc from org.jooq.Version.meta.

The version's Meta representation of the database.

Annotations
@Override
migrateToback to summary
public final Queries migrateTo(Version version)

Implements org.jooq.Version.migrateTo.

Doc from org.jooq.Version.migrateTo.

Produce a migration to a new version.

In jOOQ's commercial distributions, this method allows for migrating between versions in any direction, regardless of which version was "first" in a version graph, or if the two versions are on different branches. The resulting queries are potentially destructive in such a case. Such destructive queries ("UNDO" migrations) are prevented by default, and can be turned on using Settings#isMigrationAllowsUndo().

In jOOQ's Open Source Edition, this method only allows for migrating "forward".

Annotations
@Override
migrateToback to summary
private final Queries migrateTo(VersionImpl target, Queries result)
parentsback to summary
public final List<Version> parents()

Implements org.jooq.Node.parents.

Doc from org.jooq.Node.parents.

The parents of this node.

Annotations
@Override
subgraphToback to summary
private final VersionImpl subgraphTo(VersionImpl ancestor)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
wrapback to summary
private static List<VersionImpl.Parent> wrap(Version[] parents)
org.jooq.impl back to summary

private final Record VersionImpl.Parent

extends Record
Class Inheritance
Record Components
version:VersionImpl 
queries:Queries 

Field Summary

Modifier and TypeField and Description
private final Queries
queries

Record Component accessed by queries().

private final VersionImpl
version

Record Component accessed by version().

Constructor Summary

AccessConstructor and Description
private
Parent(VersionImpl version, Queries queries)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.
public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.
public Queries
queries()

Record Component getter of queries.

public String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.
public VersionImpl
version()

Record Component getter of version.

Field Detail

queriesback to summary
private final Queries queries

Record Component accessed by queries().

versionback to summary
private final VersionImpl version

Record Component accessed by version().

Constructor Detail

Parentback to summary
private Parent(VersionImpl version, Queries queries)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

Returns:int

a hash code value for this record.

queriesback to summary
public Queries queries()

Record Component getter of queries.

toStringback to summary
public String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Returns:String

a string representation of the object.

Annotations
@Override
versionback to summary
public VersionImpl version()

Record Component getter of version.