Package com.fauna.types
Class Module
- java.lang.Object
-
- com.fauna.types.Module
-
public final class Module extends java.lang.ObjectRepresents a module in Fauna Query Language (FQL), which serves as a symbolic object with associated methods. Modules can represent built-in FQL objects, such as "Collection" or "Math", as well as custom entities like user-defined collections.For example, a specific collection named "MyCollection" can be represented as a
Modulein Java to enable document creation via the Fauna Java driver:var q = fql( "${coll}.create({foo:'bar'})", Map.of("coll", new Module("MyCollection")) ); client.query(q);
-
-
Constructor Summary
Constructors Constructor Description Module(java.lang.String name)Constructs a newModuleobject with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Determines if this module is equal to another object.java.lang.StringgetName()Gets the name of this module as a string representation.inthashCode()Returns a hash code value for this module based on its name.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of this module as a string representation.- Returns:
- A
Stringrepresenting the module's name.
-
equals
public boolean equals(java.lang.Object obj)
Determines if this module is equal to another object. Two modules are considered equal if they have the same name.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare with this module for equality.- Returns:
trueif the specified object is equal to this module; otherwise,false.
-
hashCode
public int hashCode()
Returns a hash code value for this module based on its name.- Overrides:
hashCodein classjava.lang.Object- Returns:
- An integer hash code for this module.
-
-