org.femtoframework.orm:femto-orm

Femto useful utilities

License

License

Categories

Categories

ORM Data
GroupId

GroupId

org.femtoframework.orm
ArtifactId

ArtifactId

femto-orm
Last Version

Last Version

7.0.0
Release Date

Release Date

Type

Type

pom
Description

Description

Femto useful utilities
Project Organization

Project Organization

FemtoFraemwork
Source Code Management

Source Code Management

https://github.com/femtoframework/femto-orm.git

Download femto-orm

Filename Size
femto-orm-7.0.0.pom 2 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/org.femtoframework.orm/femto-orm/ -->
<dependency>
    <groupId>org.femtoframework.orm</groupId>
    <artifactId>femto-orm</artifactId>
    <version>7.0.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.femtoframework.orm/femto-orm/
implementation 'org.femtoframework.orm:femto-orm:7.0.0'
// https://jarcasting.com/artifacts/org.femtoframework.orm/femto-orm/
implementation ("org.femtoframework.orm:femto-orm:7.0.0")
'org.femtoframework.orm:femto-orm:pom:7.0.0'
<dependency org="org.femtoframework.orm" name="femto-orm" rev="7.0.0">
  <artifact name="femto-orm" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.femtoframework.orm', module='femto-orm', version='7.0.0')
)
libraryDependencies += "org.femtoframework.orm" % "femto-orm" % "7.0.0"
[org.femtoframework.orm/femto-orm "7.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • orm-core
  • orm-hikari

Java Micro ORM

Why Femto-ORM

Femto-ORM provides a simple way to map your POJO with relational database instead of creating SQL. And you also don't want Hibernate or Spring Data to bring you free features you don't need.

If you are going to find a total solution, please choose Hibernate or Spring Data.

Samples

import lombok.Data;

@Data
public class Device {
    
    private int id;
    
    private String model;
    
    private String productNo;
    
    private String uuid;
}
import org.femtoframework.orm.Repository;
import org.femtoframework.orm.RepositoryException;

public class DeviceServiceImpl implements DeviceService {
    
    @Inject
    Repository<Device> repository;
    
    public Device getDevice(int id) throws RepositoryException {
        return repository.getById(id);
    }
    
    public List<Device> listAllDevices() throws RepositoryException {
        return repository.listAll();
    }
    
    public boolean addDevice(Device device) throws RepositoryException {
        return repository.create(device);
    }
    
    public List<Device> searchDevicesByProductNo(String key) throws RepositoryException {
        return repository.listBy("product_no LIKE '%?%'", key);
    }
    
    public List<Device> deleteDevice(int id) throws RepositoryException {
        return repository.deleteById(id);
    }
}

org.femtoframework.orm

FemtoFramework

Femto Service framework

Versions

Version
7.0.0