Skip to content

Commit

Permalink
Merge pull request #1 from eddiecarpenter/initial
Browse files Browse the repository at this point in the history
Releasing jpalite
  • Loading branch information
eddiecarpenter authored Jul 1, 2024
2 parents fd68135 + 0c2ac4f commit d4b59b0
Show file tree
Hide file tree
Showing 215 changed files with 26,344 additions and 674 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- initial

jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.settings
.project
.classpath
.metadata
*.stale

#npm
docs/package-lock.json
docs/node_modules/
docs/build/
docs/cache/

# ItelliJ
.idea/
*.iml

# Silly Mac OSX stuff
.DS_Store
**/target/
875 changes: 201 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions docs/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
= Antora documentation site for Quarkus LangChain4j

To edit the documentation with live-reload, start Quarkus in dev mode

[source,shell]
----
$ cd docs
$ mvn quarkus:dev
----

Once the application has started, hit `w` to open the freshly generated site in browser.

See https://docs.quarkiverse.io/quarkus-antora/dev/index.html[Quarkus Antora] documentation for more details.
26 changes: 26 additions & 0 deletions docs/antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
site:
title: Offline AJPLite Docs
start_page: jpalite::index.adoc

content:
sources:
- url: .. # common module containing just the main index
branches: HEAD
start_path: docs
ui:
bundle:
url: https://github.com/eddiecarpenter/antora-ui-go-docs/releases/latest/download/ui-bundle.zip
snapshot: true

runtime:
fetch: false
cache_dir: ./cache

asciidoc:
attributes:
kroki-fetch-diagram: true
page-pagination: ''
experimental: ''

extensions:
- asciidoctor-kroki
5 changes: 5 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: jpalite
title: JPALite
version: 3.0.0
nav:
- modules/ROOT/nav.adoc
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/ROOT/assets/images/jpalitefav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/ROOT/assets/images/trace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
185 changes: 185 additions & 0 deletions docs/modules/ROOT/examples/EntityField.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.jpalite;

import jakarta.persistence.CascadeType;
import jakarta.persistence.FetchType;

import java.util.Set;

public interface EntityField
{
/**
* This method is used to get the value of the field from the entity
*
* @param entity
* @return The value retrieved from the entity
*/
Object invokeGetter(Object entity);

/**
* This method is used to set the value of the field on the entity
*
* @param entity The entity to set the value on
* @param value The value to set on the entity
*/
void invokeSetter(Object entity, Object value);

/**
* Method to get the class of the entity
*
* @return The class of the entity
*/
Class<?> getEnityClass();

/**
* Method to get the name of the field
*
* @return The name of the field
*/
String getName();

/**
* Method to get the field number
*
* @return The field number
*/
int getFieldNr();

/**
* Method to get the type of the field
*
* @return The type of the field
*/
Class<?> getType();

/**
* Method to get the column name
*
* @return The column name
*/
String getColumn();

/**
* Method to get the mapping type
*
* @return The mapping type
*/
MappingType getMappingType();

/**
* Method to check if the field is unique
*
* @return True if the field is unique, false otherwise
*/
boolean isUnique();

/**
* Method to check if the field is nullable
*
* @return True if the field is nullable, false otherwise
*/
boolean isNullable();

/**
* Method to check if the field is insertable
*
* @return True if the field is insertable, false otherwise
*/
boolean isInsertable();

/**
* Method to check if the field is updatable
*
* @return True if the field is updatable, false otherwise
*/
boolean isUpdatable();

/**
* Method to check if the field is an identity field
*
* @return True if the field is an identity field, false otherwise
*/
boolean isIdField();

/**
* Method to check if the field is a version field
*
* @return True if the field is a version field, false otherwise
*/
boolean isVersionField();

/**
* Method to retrieve the cascade settings for the field
*
* @return The cascade settings
*/
Set<CascadeType> getCascade();

/**
* Method to retrieve the fetch type for the field
*
* @return The fetch type
*/
FetchType getFetchType();

/**
* Method to set the fetch type for the field
*
* @param fetchType The fetch type
*/
void setFetchType(FetchType fetchType);

/**
* Method to retrieve the mapped by value. This value is only set if the mapping type is {@link MappingType#MANY_TO_ONE} or
* {@link MappingType#ONE_TO_ONE}
*
* @return The mapped by value. If no mapped by is set, null is returned
*/
String getMappedBy();

/**
* Method to retrieve the column definition. This value is only set if the mapping type is {@link MappingType#BASIC}
*
* @return The column definition. If no column definition is set, null is returned
*/
String getColumnDefinition();

/**
* Method to retrieve the table name. This value is only set if the mapping type is {@link MappingType#BASIC}
*
* @return The table name. If no table is set, null is returned
*/
String getTable();

/**
* Method to retrieve attribute converter class. This value is only set if the mapping type is {@link MappingType#BASIC}
*
* @return The attribute converter class. If no converter is set, null is returned
*/
@SuppressWarnings({"java:S3740", "rawtypes"})
// Suppress warning for generic types
FieldConvertType getConverter();

/**
* Determines whether the field is an entity field.
*
* @return true if the field is an entity field, false otherwise
*/
boolean isEntityField();
}
Loading

0 comments on commit d4b59b0

Please sign in to comment.