This API is EXPERIMENTAL. Use at your own risk.
Purpose
This class provides a single namespace for jOOQ's query object model API.
Every QueryPart from the DSL API has a matching QueryPart
representation in this query object model API, and a shared internal
implementation in the org.jooq.impl package, that covers both
the DSL and model API functionality.
The goal of this model API is to allow for expression tree transformations
via QueryPart#$replace(Function1) as well as via per-querypart
methods, such as for example QOM.Substring.$startingPosition(Field), and
traversals via QueryPart.$traverse(Traverser) that are independent of
the DSL API that would otherwise be too noisy for this task.
Design
In order to avoid conflicts between the model API and the DSL API, all model API in this class follows these naming conventions:
- All public model API types are nested in the
QOMclass, whereas DSL API types are top level types in theorg.jooqpackage. - All accessor methods and their corresponding "immutable setters"
(returning a copy containing the modification) are named
$property(), e.g.QOM.Substring.$startingPosition()andQOM.Substring.$startingPosition(Field). - All private model API utility types are named
UXyz, e.g.QOM.UEmpty
Limitations
The API offers public access to jOOQ's internal representation, and as such, is prone to incompatible changes between minor releases, in addition to the incompatible changes that may arise due to this API being experimental. In this experimental stage, the following limitations are accepted:
- Not all
QueryPartimplementations have a corresponding publicQueryParttype yet, but may just implement the API via aQOM.UEmptyorQOM.UNotYetImplementedsubtype, and may not provide access to contents via accessor methods. - Some child elements of a
QueryPartmay not yet be represented in the model API, such as for example theSELECT … FOR UPDATEclause, as substantial changes to the internal model are still required before being able to offer public access to it.
Mutability
While some elements of this API are historically mutable (either mutable
objects are returned from QueryPart subtypes, or argument objects
when constructing an QueryPart remains mutable, rather than copied),
users must not rely on this mutable behaviour. Once this API stabilises, all
mutability will be gone, accidental remaining mutability will be considered a
bug.
Notes
A future Java 17 distribution of jOOQ might make use of sealed types to improve the usability of the model API in pattern matching expressions etc. Other Java language features that benefit pattern matching expression trees might be adopted in the future in this area of the jOOQ API.
- Author:
- Lukas Eder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceTheABSfunction.static interfaceTheACOSfunction.static interfaceTheADDoperator.static interfaceTheALTER DATABASEstatement.static interfaceTheALTER DOMAINstatement.static interfaceTheALTER INDEXstatement.static interfaceTheALTER SCHEMAstatement.static interfaceQOM.AlterSequence<T extends Number>TheALTER SEQUENCEstatement.static interfaceTheALTER TYPEstatement.static interfaceTheALTER VIEWstatement.static interfaceTheANDoperator.static interfaceTheANY VALUEfunction.static interfacestatic interfacestatic interfaceTheARRAY GETfunction.static interfacestatic interfaceTheASCIIfunction.static interfaceTheASINfunction.static interfacestatic interfaceTheATANfunction.static interfaceTheATAN2function.static interfaceTheAVGfunction.static interfacestatic interfaceQOM.BitAnd<T extends Number>TheBIT ANDoperator.static interfaceQOM.BitAndAgg<T extends Number>TheBIT AND AGGfunction.static interfaceTheBIT COUNTfunction.static interfaceTheBIT LENGTHfunction.static interfaceQOM.BitNand<T extends Number>TheBIT NANDoperator.static interfaceQOM.BitNor<T extends Number>TheBIT NORoperator.static interfaceQOM.BitNot<T extends Number>TheBIT NOToperator.static interfaceTheBIT ORoperator.static interfaceQOM.BitOrAgg<T extends Number>TheBIT OR AGGfunction.static interfaceQOM.BitXNor<T extends Number>TheBIT X NORoperator.static interfaceQOM.BitXor<T extends Number>TheBIT XORoperator.static interfaceQOM.BitXorAgg<T extends Number>TheBIT XOR AGGfunction.static interfaceTheBOOL ANDfunction.static interfaceTheBOOL ORfunction.static interfaceTheCALLstatement.static interfaceTheCARDINALITYfunction.static enumTheCascadetype.static interfacestatic interfaceTheCEILfunction.static interfaceTheCHAR LENGTHfunction.static interfacestatic interfacestatic interfaceTheCHRfunction.static interfacestatic interfacestatic interfacestatic interfaceQOM.Collect<T,A extends ArrayRecord<T>> static interfacestatic interfaceTheCOMMENT ON TABLEstatement.static interfacestatic interfacestatic interfaceTheFIELDfunction.static interfaceTheCONNECT BY ISCYCLEfunction.static interfaceTheCONNECT BY ISLEAFfunction.static interfaceTheCONNECT BY ROOTfunction.static interfaceTheCONTAINSoperator.static interfaceTheCONTAINS IGNORE CASEoperator.static interfacestatic interfacestatic interfaceTheCORRfunction.static interfaceTheCOSfunction.static interfaceTheCOSHfunction.static interfaceTheCOTfunction.static interfaceTheCOTHfunction.static interfaceTheCOUNTfunction.static interfacestatic interfaceTheCOVAR POPfunction.static interfaceTheCOVAR SAMPfunction.static interfaceTheCREATE DATABASEstatement.static interfaceTheCREATE DOMAINstatement.static interfaceTheCREATE FUNCTIONstatement.static interfaceTheCREATE INDEXstatement.static interfaceTheCREATE PROCEDUREstatement.static interfaceTheCREATE SCHEMAstatement.static interfaceTheCREATE SEQUENCEstatement.static interfaceTheCREATE TRIGGERstatement.static interfacestatic interfaceQOM.CreateView<R extends Record>static interfacestatic interfacestatic interfaceTheCURRENT CATALOGfunction.static interfacestatic interfaceTheCURRENT SCHEMAfunction.static interfacestatic interfacestatic interfaceTheCURRENT USERfunction.static enumTheCycleOptiontype.static interfaceQOM.DataChangeDeltaTable<R extends Record>static interfaceTheDATE ADDfunction.static interfacestatic interfacestatic interfaceTheDEGREESfunction.static interfaceTheDELETINGfunction.static interfacestatic interfaceQOM.DerivedTable<R extends Record>static enumTheDeterministictype.static interfaceTheDIGITSfunction.static interfaceTheDIVoperator.static enumTheDocumentOrContenttype.static interfaceTheDROP DATABASEstatement.static interfaceTheDROP DOMAINstatement.static interfaceTheDROP FUNCTIONstatement.static interfaceTheDROP INDEXstatement.static interfaceTheDROP PROCEDUREstatement.static interfaceTheDROP SCHEMAstatement.static interfaceTheDROP SEQUENCEstatement.static interfaceTheDROP TABLEstatement.static interfaceTheDROP TRIGGERstatement.static interfacestatic interfaceTheDROP VIEWstatement.static interfacestatic interfaceTheENDS WITHoperator.static interfaceTheENDS WITH IGNORE CASEoperator.static interfaceTheEQoperator.static interfaceTheEfunction.static interfaceTheEXECUTEfunction.static interfaceTheEXISTSfunction.static interfacestatic interfaceTheEXPfunction.static interfacestatic interfacestatic interfaceTheCONDITIONfunction.static interfacestatic interfacestatic interfaceTheFLOORfunction.static interfacestatic enumTheFrameExcludetype.static enumTheFrameUnitstype.static enumTheFromFirstOrLasttype.static interfacestatic interfaceTheGEoperator.static interfacestatic enumTheGenerationOptiontype.static interfaceTheGOTOfunction.static interfaceTheGRANTstatement.static interfacestatic interfacestatic interfaceTheGToperator.static enumTheIdentityRestartOptiontype.static interfacestatic interfacestatic interfaceTheINoperator.static interfacestatic interfacestatic interfaceTheINSERTINGfunction.static interfaceTheIS DISTINCT FROMoperator.static interfaceTheIS DOCUMENToperator.static interfaceTheIS JSONoperator.static interfaceTheIS NOT DISTINCT FROMoperator.static interfaceTheIS NOT DOCUMENToperator.static interfaceTheIS NOT JSONoperator.static interfaceTheIS NOT NULLoperator.static interfaceTheIS NULLoperator.static interfaceTheJSON ARRAYfunction.static interfacestatic interfaceTheJSON OBJECTfunction.static interfacestatic enumTheJSONOnNulltype.static interfacestatic interfacestatic interfacestatic interfacestatic interfaceQOM.Lateral<R extends Record>static interfaceTheLEoperator.static interfacestatic interfacestatic interfaceTheLEFTfunction.static interfaceTheLEVELfunction.static interfaceTheLIKEoperator.static interfaceTheLIKE IGNORE CASEoperator.static interfaceQOM.LinkedTable<R extends Record>static interfaceTheLNfunction.static interfaceTheLOG10function.static interfacestatic interfaceTheLOWERfunction.static interfaceTheLPADfunction.static interfaceTheLToperator.static interfaceTheLTRIMfunction.static enumTheMaterializedtype.static interfaceTheMAXfunction.static interfaceTheMD5function.static interfaceTheMEDIANfunction.static interfaceTheMINfunction.static interfaceTheMODoperator.static interfacestatic interfaceTheMULoperator.static interfaceQOM.Multiset<R extends Record>static interfaceQOM.MultisetAgg<R extends Record>static interfaceTheNEoperator.static interfacestatic interfaceTheNOToperator.static interfaceTheNOToperator.static interfaceTheNOT INoperator.static interfacestatic interfaceTheNOT LIKEoperator.static interfaceTheNOT LIKE IGNORE CASEoperator.static interfaceTheNOT SIMILAR TOoperator.static classDeprecated, for removal: This API element is subject to removal in a future version.- [#12425] - 3.16.0 - Missing implementations should be added as soon as possible!static interfacestatic interfacestatic enumTheNullCallClausetype.static interfaceTheNULLIFfunction.static enumTheNullOrderingtype.static interfacestatic enumTheNullTreatmenttype.static interfaceTheNVLfunction.static interfacestatic interfaceTheOCTET LENGTHfunction.static interfaceTheORoperator.static interfaceTheOVERLAYfunction.static interfacestatic interfaceThePIfunction.static interfaceThePLUSoperator.static interfaceThePOSITIONfunction.static interfaceThePOWERoperator.static interfacestatic interfaceThePRIORfunction.static interfaceThePRODUCTfunction.static interfaceTheROWIDoperator.static interfaceTheRADIANSfunction.static interfaceTheRANDfunction.static interfacestatic interfacestatic interfacestatic interfaceTheREGR AVGXfunction.static interfaceTheREGR AVGYfunction.static interfaceTheREGR COUNTfunction.static interfaceTheREGR INTERCEPTfunction.static interfaceTheREGR R2function.static interfaceTheREGR SLOPEfunction.static interfaceTheREGR SXXfunction.static interfaceTheREGR SXYfunction.static interfaceTheREGR SYYfunction.static interfaceTheREPEATfunction.static interfaceTheREPLACEfunction.static enumTheResultOptiontype.static interfaceTheRETURN_function.static interfaceTheREVERSEfunction.static interfaceTheREVOKEstatement.static interfaceTheRIGHTfunction.static interfacestatic interfaceTheROUNDfunction.static interfacestatic interfaceQOM.RowField<R extends Record>static interfacestatic interfacestatic interfaceTheROWNUMfunction.static interfacestatic interfacestatic interfacestatic interfaceTheRPADfunction.static interfaceTheRTRIMfunction.static interfacestatic interfacestatic interfacestatic interfaceTheSET CATALOGstatement.static interfaceTheSETstatement.static interfaceTheSET SCHEMAstatement.static interfaceTheSHLoperator.static interfaceTheSHRoperator.static interfaceTheSIGNfunction.static interfaceTheSIGNAL SQL STATEfunction.static interfaceTheSIMILAR TOoperator.static interfaceTheSINfunction.static interfaceTheSINHfunction.static interfaceTheSPACEfunction.static interfaceTheSPLIT PARTfunction.static enumTheSQLDataAccesstype.static interfaceTheSQRTfunction.static interfaceQOM.Square<T extends Number>TheSQUAREfunction.static interfaceTheST AREAfunction.static interfaceTheSTARTS WITHoperator.static interfaceTheSTARTS WITH IGNORE CASEoperator.static interfaceTheST ASBINARYfunction.static interfaceTheST ASTEXTfunction.static interfaceTheST CENTROIDfunction.static interfaceQOM.StContains<T extends Spatial>TheST CONTAINSfunction.static interfaceTheST CROSSESfunction.static interfaceTheSTDDEV POPfunction.static interfaceTheSTDDEV SAMPfunction.static interfaceQOM.StDifference<T extends Spatial>TheST DIFFERENCEfunction.static interfaceQOM.StDisjoint<T extends Spatial>TheST DISJOINTfunction.static interfaceQOM.StDistance<T extends Spatial>TheST DISTANCEfunction.static interfaceQOM.StEndPoint<T extends Spatial>TheST ENDPOINTfunction.static interfaceQOM.StEquals<T extends Spatial>TheST EQUALSfunction.static interfaceTheST EXTERIORRINGfunction.static interfaceQOM.StGeometryN<T extends Spatial>TheST GEOMETRYNfunction.static interfaceTheST GEOMETRYTYPEfunction.static interfaceTheST GEOMFROMTEXTfunction.static interfaceTheST GEOMFROMWKBfunction.static interfaceTheST INTERIORRINGNfunction.static interfaceQOM.StIntersection<T extends Spatial>TheST INTERSECTIONfunction.static interfaceQOM.StIntersects<T extends Spatial>TheST INTERSECTSfunction.static interfaceTheST ISCLOSEDfunction.static interfaceTheST ISEMPTYfunction.static interfaceTheST LENGTHfunction.static interfaceTheST NUMGEOMETRIESfunction.static interfaceTheST NUMINTERIORRINGfunction.static interfaceTheST NUMPOINTSfunction.static interfaceQOM.StOverlaps<T extends Spatial>TheST OVERLAPSfunction.static interfaceQOM.StPointN<T extends Spatial>TheST POINTNfunction.static interfaceTheST SRIDfunction.static interfaceQOM.StStartPoint<T extends Spatial>TheST STARTPOINTfunction.static interfaceQOM.StTouches<T extends Spatial>TheST TOUCHESfunction.static interfaceQOM.StUnion<T extends Spatial>TheST UNIONfunction.static interfaceQOM.StWithin<T extends Spatial>TheST WITHINfunction.static interfaceTheST Xfunction.static interfaceTheST Yfunction.static interfaceTheST Zfunction.static interfaceTheSUBoperator.static interfaceTheSUBSTRINGfunction.static interfaceTheSUBSTRING INDEXfunction.static interfaceTheSUMfunction.static interfaceTheSYS CONNECT BY PATHfunction.static interfaceQOM.TableAlias<R extends Record>static interfaceQOM.TableEq<R extends Record>TheEQoperator.static interfaceQOM.TableNe<R extends Record>TheNEoperator.static interfaceTheTANfunction.static interfaceTheTANHfunction.static interfaceTheTAUfunction.static interfacestatic interfaceTheTO CHARfunction.static interfaceTheTO DATEfunction.static interfaceTheTO HEXfunction.static interfaceTheTO TIMESTAMPfunction.static interfaceTheTRANSLATEfunction.static interfaceTheTRIMfunction.static interfaceTheTRUNCfunction.static interfaceQOM.Truncate<R extends Record>TheTRUNCATEstatement.static interfaceTheUNIQUEfunction.static interfacestatic interfaceQOM.UnmodifiableCollection<Q extends QueryPart>An unmodifiableCollectionofQueryPartelements.static interfaceQOM.UnmodifiableList<Q extends QueryPart>static interfaceTheUPDATINGfunction.static interfaceTheUPPERfunction.static interfaceTheUUIDfunction.static interfacestatic interfaceQOM.Values<R extends Record>static interfaceTheVAR POPfunction.static interfaceTheVAR SAMPfunction.static interfaceQOM.WidthBucket<T extends Number>TheWIDTH BUCKETfunction.static interfacestatic interfacestatic interfacestatic interfaceTheXMLCOMMENTfunction.static interfaceTheXMLCONCATfunction.static interfaceTheXMLDOCUMENTfunction.static interfacestatic interfacestatic interfaceTheXMLFORESTfunction.static interfacestatic enumTheXMLPassingMechanismtype.static interfaceTheXMLPIfunction.static interfacestatic interfaceTheXMLSERIALIZEfunction. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final <Q extends QueryPart>
QOM.UnmodifiableList<Q>unmodifiable(Collection<Q> collection) Turn aCollectioninto an unmodifiableQOM.UnmodifiableList.static final <Q extends QueryPart>
QOM.UnmodifiableList<Q>unmodifiable(List<Q> list) Turn aListinto an unmodifiableQOM.UnmodifiableList.static final <Q extends QueryPart>
QOM.UnmodifiableList<Q>unmodifiable(Q[] array) Turn an array into an unmodifiableQOM.UnmodifiableList.
-
Constructor Details
-
QOM
public QOM()
-
-
Method Details
-
unmodifiable
Turn an array into an unmodifiableQOM.UnmodifiableList. -
unmodifiable
@Internal public static final <Q extends QueryPart> QOM.UnmodifiableList<Q> unmodifiable(List<Q> list) Turn aListinto an unmodifiableQOM.UnmodifiableList. -
unmodifiable
@Internal public static final <Q extends QueryPart> QOM.UnmodifiableList<Q> unmodifiable(Collection<Q> collection) Turn aCollectioninto an unmodifiableQOM.UnmodifiableList.
-