Top Fields Constructors Methods
org.jooq.impl

pack-priv final Class CommitImpl

extends AbstractNode<Commit>
implements Commit
Class Inheritance
All Implemented Interfaces
org.jooq.Commit, org.jooq.Node
Static Imports
org.jooq.ContentType.INCREMENT, .ContentType.SCHEMA, org.jooq.impl.Tools.EMPTY_SOURCE, org.jooq.tools.StringUtils.isBlank

Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
private final Configuration
private final DSLContext
private final Map<String, File>
private final Map<String, File>
private final List<? extends Commit>

Constructor Summary

AccessConstructor and Description
pack-priv
CommitImpl(Configuration configuration, String id, String message, List<? extends Commit> parents, Collection<? extends File> delta)

Method Summary

Modifier and TypeMethod and Description
private static final Map<String, File>
apply(Map<String, File> result, Collection<? extends File> list, boolean applyDeletions)

private static final Map<String, File>
apply(Map<String, File> result, File file, boolean applyDeletions)

public final Commit
commit(String newId, File... newFiles)

Implements org.jooq.Commit.commit.

Create a new commit on top of this one.
public final Commit
commit(String newId, Collection<? extends File> newFiles)

Implements org.jooq.Commit.commit.

Create a new commit on top of this one.
public final Commit
commit(String newId, String newMessage, File... newFiles)

Implements org.jooq.Commit.commit.

Create a new commit on top of this one.
public final Commit
commit(String newId, String newMessage, Collection<? extends File> newFiles)

Implements org.jooq.Commit.commit.

Create a new commit on top of this one.
public final Collection<File>
delta()

Implements org.jooq.Commit.delta.

The files affected by this commit, in no particular order.
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.
public final Collection<File>
files()

Implements org.jooq.Commit.files.

The files after this commit, in no particular order.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private static final void
history(Deque<Commit> commitHistory, Set<Commit> set, List<Commit> commits)

Breadth first recursion over commit graph.

private final Map<String, File>
private static final Map<String, File>
map(Collection<? extends File> list, boolean applyDeletions)

public final Commit
merge(String newId, Commit with, File... newFiles)

Implements org.jooq.Commit.merge.

Merge two commits.
public final Commit
merge(String newId, Commit with, Collection<? extends File> newFiles)

Implements org.jooq.Commit.merge.

Merge two commits.
public final Commit
merge(String newId, String newMessage, Commit with, File... newFiles)

Implements org.jooq.Commit.merge.

Merge two commits.
public final Commit
merge(String newId, String newMessage, Commit with, Collection<? extends File> newFiles)

Implements org.jooq.Commit.merge.

Merge two commits.
public final Meta
meta()

Implements org.jooq.Commit.meta.

Get the meta data representing this commit.
public final Files
migrateTo(Commit resultCommit)

Implements org.jooq.Commit.migrateTo.

Create a version graph when migrating between two commits.
private final Files
migrateTo0(Commit resultCommit)

private static final void
move(Map<String, File> files, Map<String, File> result, Map<String, String> keys)

private static final void
public final List<Commit>
parents()

Implements org.jooq.Node.parents.

The parents of this node.
private static final Collection<Source>
public final Collection<Source>
sources()

Implements org.jooq.Commit.sources.

The sources after this commit, in no particular order.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public final Version
version()

Implements org.jooq.Commit.version.

Get the version representing this commit.
private static final Version
version(Version from, String newId, Map<String, File> files, Collection<File> result)

Inherited from org.jooq.impl.AbstractNode:
commonAncestoridmessageroot

Field Detail

configurationback to summary
private final Configuration configuration
ctxback to summary
private final DSLContext ctx
deltaback to summary
private final Map<String, File> delta
filesback to summary
private final Map<String, File> files
parentsback to summary
private final List<? extends Commit> parents

Constructor Detail

CommitImplback to summary
pack-priv CommitImpl(Configuration configuration, String id, String message, List<? extends Commit> parents, Collection<? extends File> delta)

Method Detail

applyback to summary
private static final Map<String, File> apply(Map<String, File> result, Collection<? extends File> list, boolean applyDeletions)
applyback to summary
private static final Map<String, File> apply(Map<String, File> result, File file, boolean applyDeletions)
commitback to summary
public final Commit commit(String newId, File... newFiles)

Implements org.jooq.Commit.commit.

Doc from org.jooq.Commit.commit.

Create a new commit on top of this one.

Annotations
@Override
commitback to summary
public final Commit commit(String newId, Collection<? extends File> newFiles)

Implements org.jooq.Commit.commit.

Doc from org.jooq.Commit.commit.

Create a new commit on top of this one.

Annotations
@Override
commitback to summary
public final Commit commit(String newId, String newMessage, File... newFiles)

Implements org.jooq.Commit.commit.

Doc from org.jooq.Commit.commit.

Create a new commit on top of this one.

Annotations
@Override
commitback to summary
public final Commit commit(String newId, String newMessage, Collection<? extends File> newFiles)

Implements org.jooq.Commit.commit.

Doc from org.jooq.Commit.commit.

Create a new commit on top of this one.

Annotations
@Override
deltaback to summary
public final Collection<File> delta()

Implements org.jooq.Commit.delta.

Doc from org.jooq.Commit.delta.

The files affected by this commit, in no particular order.

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
filesback to summary
public final Collection<File> files()

Implements org.jooq.Commit.files.

Doc from org.jooq.Commit.files.

The files after this commit, in no particular order.

Annotations
@Override
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
historyback to summary
private static final void history(Deque<Commit> commitHistory, Set<Commit> set, List<Commit> commits)

Breadth first recursion over commit graph.

initFilesback to summary
private final Map<String, File> initFiles()
mapback to summary
private static final Map<String, File> map(Collection<? extends File> list, boolean applyDeletions)
mergeback to summary
public final Commit merge(String newId, Commit with, File... newFiles)

Implements org.jooq.Commit.merge.

Doc from org.jooq.Commit.merge.

Merge two commits.

Annotations
@Override
mergeback to summary
public final Commit merge(String newId, Commit with, Collection<? extends File> newFiles)

Implements org.jooq.Commit.merge.

Doc from org.jooq.Commit.merge.

Merge two commits.

Annotations
@Override
mergeback to summary
public final Commit merge(String newId, String newMessage, Commit with, File... newFiles)

Implements org.jooq.Commit.merge.

Doc from org.jooq.Commit.merge.

Merge two commits.

Annotations
@Override
mergeback to summary
public final Commit merge(String newId, String newMessage, Commit with, Collection<? extends File> newFiles)

Implements org.jooq.Commit.merge.

Doc from org.jooq.Commit.merge.

Merge two commits.

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

Implements org.jooq.Commit.meta.

Doc from org.jooq.Commit.meta.

Get the meta data representing this commit.

Annotations
@Override
migrateToback to summary
public final Files migrateTo(Commit resultCommit)

Implements org.jooq.Commit.migrateTo.

Doc from org.jooq.Commit.migrateTo.

Create a version graph when migrating between two commits.

Annotations
@Override
migrateTo0back to summary
private final Files migrateTo0(Commit resultCommit)
moveback to summary
private static final void move(Map<String, File> files, Map<String, File> result, Map<String, String> keys)
moveAllButLastback to summary
private static final void moveAllButLast(Map<String, List<String>> keys, Set<String> remove)
parentsback to summary
public final List<Commit> parents()

Implements org.jooq.Node.parents.

Doc from org.jooq.Node.parents.

The parents of this node.

Annotations
@Override
sourcesback to summary
private static final Collection<Source> sources(Collection<File> files)
sourcesback to summary
public final Collection<Source> sources()

Implements org.jooq.Commit.sources.

Doc from org.jooq.Commit.sources.

The sources after this commit, in no particular order.

Annotations
@Override
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
versionback to summary
public final Version version()

Implements org.jooq.Commit.version.

Doc from org.jooq.Commit.version.

Get the version representing this commit.

Annotations
@Override
versionback to summary
private static final Version version(Version from, String newId, Map<String, File> files, Collection<File> result)