Function bodies 391 total
engineService method · java · L35-L37 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/config/ApplicationConfig.java
public EngineService engineService(EngineRepository engineRepository) {
return new EngineService(engineRepository);
}transmissionService method · java · L40-L42 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/config/ApplicationConfig.java
public TransmissionService transmissionService(TransmissionRepository transmissionRepository) {
return new TransmissionService(transmissionRepository);
}generationService method · java · L45-L48 (4 LOC)src/main/java/live/yurii/autocatalog/infrastructure/config/ApplicationConfig.java
public GenerationService generationService(GenerationRepository generationRepository,
CarModelRepository modelRepository) {
return new GenerationService(generationRepository, modelRepository);
}bodyService method · java · L51-L54 (4 LOC)src/main/java/live/yurii/autocatalog/infrastructure/config/ApplicationConfig.java
public BodyService bodyService(BodyRepository bodyRepository,
GenerationRepository generationRepository) {
return new BodyService(bodyRepository, generationRepository);
}variantService method · java · L57-L62 (6 LOC)src/main/java/live/yurii/autocatalog/infrastructure/config/ApplicationConfig.java
public VariantService variantService(VariantRepository variantRepository,
BodyRepository bodyRepository,
EngineRepository engineRepository,
TransmissionRepository transmissionRepository) {
return new VariantService(variantRepository, bodyRepository, engineRepository, transmissionRepository);
}BodyJpaEntity class · java · L15-L90 (76 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
class BodyJpaEntity {
@Id
@Column(nullable = false, updatable = false)
private UUID id;
@Column(name = "generation_id", nullable = false, updatable = false)
private UUID generationId;
@Enumerated(EnumType.STRING)
@Column(name = "body_style", nullable = false, length = 20)
private BodyStyle bodyStyle;
@Column(name = "length_mm", nullable = false)
private int lengthMm;
@Column(name = "width_mm", nullable = false)
private int widthMm;
@Column(name = "height_mm", nullable = false)
private int heightMm;
@Column(name = "wheelbase_mm", nullable = false)
private int wheelbaseMm;
@Column(name = "trunk_volume_litres")
private Integer trunkVolumeLitres;
protected BodyJpaEntity() {
}
BodyJpaEntity(UUID id, UUID generationId, BodyStyle bodyStyle,
int lengthMm, int widthMm, int heightMm, int wheelbaseMm,
Integer trunkVolumeLitres) {
this.id = id;
this.generationId = generationId;
this.bodyStyle = bodyStylBodyJpaEntity method · java · L46-L57 (12 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
BodyJpaEntity(UUID id, UUID generationId, BodyStyle bodyStyle,
int lengthMm, int widthMm, int heightMm, int wheelbaseMm,
Integer trunkVolumeLitres) {
this.id = id;
this.generationId = generationId;
this.bodyStyle = bodyStyle;
this.lengthMm = lengthMm;
this.widthMm = widthMm;
this.heightMm = heightMm;
this.wheelbaseMm = wheelbaseMm;
this.trunkVolumeLitres = trunkVolumeLitres;
}Open data scored by Repobility · https://repobility.com
id method · java · L59-L61 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
UUID id() {
return id;
}generationId method · java · L63-L65 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
UUID generationId() {
return generationId;
}bodyStyle method · java · L67-L69 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
BodyStyle bodyStyle() {
return bodyStyle;
}lengthMm method · java · L71-L73 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
int lengthMm() {
return lengthMm;
}widthMm method · java · L75-L77 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
int widthMm() {
return widthMm;
}heightMm method · java · L79-L81 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
int heightMm() {
return heightMm;
}wheelbaseMm method · java · L83-L85 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
int wheelbaseMm() {
return wheelbaseMm;
}trunkVolumeLitres method · java · L87-L89 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyJpaEntity.java
Integer trunkVolumeLitres() {
return trunkVolumeLitres;
}Repobility — same analyzer, your code, free for public repos · /scan/
BodyRepositoryAdapter class · java · L14-L63 (50 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public class BodyRepositoryAdapter implements BodyRepository {
private final BodyJpaRepository jpa;
public BodyRepositoryAdapter(BodyJpaRepository jpa) {
this.jpa = jpa;
}
@Override
public Body save(Body body) {
jpa.save(toEntity(body));
return body;
}
@Override
public Optional<Body> findById(BodyId id) {
return jpa.findById(id.value()).map(this::toDomain);
}
@Override
public List<Body> findByGenerationId(GenerationId generationId) {
return jpa.findByGenerationId(generationId.value()).stream().map(this::toDomain).toList();
}
@Override
public boolean existsByGenerationIdAndBodyStyle(GenerationId generationId, BodyStyle bodyStyle) {
return jpa.existsByGenerationIdAndBodyStyle(generationId.value(), bodyStyle);
}
@Override
public void deleteById(BodyId id) {
jpa.deleteById(id.value());
}
private BodyJpaEntity toEntity(Body b) {
return new BodyJpaEntity(
b.id().value(), b.generationId().value(), b.bodyStyle(BodyRepositoryAdapter method · java · L18-L20 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public BodyRepositoryAdapter(BodyJpaRepository jpa) {
this.jpa = jpa;
}save method · java · L23-L26 (4 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public Body save(Body body) {
jpa.save(toEntity(body));
return body;
}findById method · java · L29-L31 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public Optional<Body> findById(BodyId id) {
return jpa.findById(id.value()).map(this::toDomain);
}findByGenerationId method · java · L34-L36 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public List<Body> findByGenerationId(GenerationId generationId) {
return jpa.findByGenerationId(generationId.value()).stream().map(this::toDomain).toList();
}existsByGenerationIdAndBodyStyle method · java · L39-L41 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public boolean existsByGenerationIdAndBodyStyle(GenerationId generationId, BodyStyle bodyStyle) {
return jpa.existsByGenerationIdAndBodyStyle(generationId.value(), bodyStyle);
}deleteById method · java · L44-L46 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
public void deleteById(BodyId id) {
jpa.deleteById(id.value());
}toEntity method · java · L48-L54 (7 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
private BodyJpaEntity toEntity(Body b) {
return new BodyJpaEntity(
b.id().value(), b.generationId().value(), b.bodyStyle(),
b.lengthMm(), b.widthMm(), b.heightMm(), b.wheelbaseMm(),
b.trunkVolumeLitres()
);
}Source: Repobility analyzer · https://repobility.com
toDomain method · java · L56-L62 (7 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/body/BodyRepositoryAdapter.java
private Body toDomain(BodyJpaEntity e) {
return Body.reconstitute(
new BodyId(e.id()), new GenerationId(e.generationId()), e.bodyStyle(),
e.lengthMm(), e.widthMm(), e.heightMm(), e.wheelbaseMm(),
e.trunkVolumeLitres()
);
}EngineJpaEntity class · java · L15-L107 (93 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
class EngineJpaEntity {
@Id
@Column(nullable = false, updatable = false)
private UUID id;
@Column(nullable = false, unique = true, length = 50)
private String code;
@Column(nullable = false, length = 150)
private String name;
@Enumerated(EnumType.STRING)
@Column(name = "fuel_type", nullable = false, length = 30)
private FuelType fuelType;
@Column(name = "displacement_cc", nullable = false)
private int displacementCc;
@Column(name = "power_kw", nullable = false)
private int powerKw;
@Column(name = "torque_nm", nullable = false)
private int torqueNm;
@Column(name = "cylinder_count")
private Integer cylinderCount;
@Column(length = 20)
private String configuration;
@Column(name = "system_power_kw")
private Integer systemPowerKw;
protected EngineJpaEntity() {
}
EngineJpaEntity(UUID id, String code, String name, FuelType fuelType,
int displacementCc, int powerKw, int torqueNm,
Integer cylinderCoEngineJpaEntity method · java · L52-L66 (15 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
EngineJpaEntity(UUID id, String code, String name, FuelType fuelType,
int displacementCc, int powerKw, int torqueNm,
Integer cylinderCount, String configuration,
Integer systemPowerKw) {
this.id = id;
this.code = code;
this.name = name;
this.fuelType = fuelType;
this.displacementCc = displacementCc;
this.powerKw = powerKw;
this.torqueNm = torqueNm;
this.cylinderCount = cylinderCount;
this.configuration = configuration;
this.systemPowerKw = systemPowerKw;
}id method · java · L68-L70 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
UUID id() {
return id;
}code method · java · L72-L74 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
String code() {
return code;
}name method · java · L76-L78 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
String name() {
return name;
}fuelType method · java · L80-L82 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
FuelType fuelType() {
return fuelType;
}displacementCc method · java · L84-L86 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
int displacementCc() {
return displacementCc;
}Repobility · code-quality intelligence platform · https://repobility.com
powerKw method · java · L88-L90 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
int powerKw() {
return powerKw;
}torqueNm method · java · L92-L94 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
int torqueNm() {
return torqueNm;
}cylinderCount method · java · L96-L98 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
Integer cylinderCount() {
return cylinderCount;
}configuration method · java · L100-L102 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
String configuration() {
return configuration;
}systemPowerKw method · java · L104-L106 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineJpaEntity.java
Integer systemPowerKw() {
return systemPowerKw;
}EngineRepositoryAdapter class · java · L13-L72 (60 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public class EngineRepositoryAdapter implements EngineRepository {
private final EngineJpaRepository jpa;
public EngineRepositoryAdapter(EngineJpaRepository jpa) {
this.jpa = jpa;
}
@Override
public Engine save(Engine engine) {
jpa.save(toEntity(engine));
return engine;
}
@Override
public Optional<Engine> findById(EngineId id) {
return jpa.findById(id.value()).map(this::toDomain);
}
@Override
public Optional<Engine> findByCode(String code) {
return jpa.findByCode(code).map(this::toDomain);
}
@Override
public List<Engine> findAll() {
return jpa.findAll().stream().map(this::toDomain).toList();
}
@Override
public List<Engine> findByFuelType(FuelType fuelType) {
return jpa.findByFuelType(fuelType).stream().map(this::toDomain).toList();
}
@Override
public boolean existsByCode(String code) {
return jpa.existsByCode(code);
}
@Override
public void deleteById(EngineId id) {
jpa.deleteById(id.value());
}EngineRepositoryAdapter method · java · L17-L19 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public EngineRepositoryAdapter(EngineJpaRepository jpa) {
this.jpa = jpa;
}save method · java · L22-L25 (4 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public Engine save(Engine engine) {
jpa.save(toEntity(engine));
return engine;
}Open data scored by Repobility · https://repobility.com
findById method · java · L28-L30 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public Optional<Engine> findById(EngineId id) {
return jpa.findById(id.value()).map(this::toDomain);
}findByCode method · java · L33-L35 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public Optional<Engine> findByCode(String code) {
return jpa.findByCode(code).map(this::toDomain);
}findAll method · java · L38-L40 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public List<Engine> findAll() {
return jpa.findAll().stream().map(this::toDomain).toList();
}findByFuelType method · java · L43-L45 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public List<Engine> findByFuelType(FuelType fuelType) {
return jpa.findByFuelType(fuelType).stream().map(this::toDomain).toList();
}existsByCode method · java · L48-L50 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public boolean existsByCode(String code) {
return jpa.existsByCode(code);
}deleteById method · java · L53-L55 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
public void deleteById(EngineId id) {
jpa.deleteById(id.value());
}toEntity method · java · L57-L63 (7 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
private EngineJpaEntity toEntity(Engine e) {
return new EngineJpaEntity(
e.id().value(), e.code(), e.name(), e.fuelType(),
e.displacementCc(), e.powerKw(), e.torqueNm(),
e.cylinderCount(), e.configuration(), e.systemPowerKw()
);
}toDomain method · java · L65-L71 (7 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/engine/EngineRepositoryAdapter.java
private Engine toDomain(EngineJpaEntity e) {
return Engine.reconstitute(
new EngineId(e.id()), e.code(), e.name(), e.fuelType(),
e.displacementCc(), e.powerKw(), e.torqueNm(),
e.cylinderCount(), e.configuration(), e.systemPowerKw()
);
}Repobility — same analyzer, your code, free for public repos · /scan/
GenerationJpaEntity class · java · L12-L60 (49 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/generation/GenerationJpaEntity.java
class GenerationJpaEntity {
@Id
@Column(nullable = false, updatable = false)
private UUID id;
@Column(name = "model_id", nullable = false, updatable = false)
private UUID modelId;
@Column(nullable = false, length = 50)
private String name;
@Column(name = "year_from", nullable = false)
private int yearFrom;
@Column(name = "year_to")
private Integer yearTo;
protected GenerationJpaEntity() {
}
GenerationJpaEntity(UUID id, UUID modelId, String name, int yearFrom, Integer yearTo) {
this.id = id;
this.modelId = modelId;
this.name = name;
this.yearFrom = yearFrom;
this.yearTo = yearTo;
}
UUID id() {
return id;
}
UUID modelId() {
return modelId;
}
String name() {
return name;
}
int yearFrom() {
return yearFrom;
}
Integer yearTo() {
return yearTo;
}
}GenerationJpaEntity method · java · L33-L39 (7 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/generation/GenerationJpaEntity.java
GenerationJpaEntity(UUID id, UUID modelId, String name, int yearFrom, Integer yearTo) {
this.id = id;
this.modelId = modelId;
this.name = name;
this.yearFrom = yearFrom;
this.yearTo = yearTo;
}id method · java · L41-L43 (3 LOC)src/main/java/live/yurii/autocatalog/infrastructure/persistence/generation/GenerationJpaEntity.java
UUID id() {
return id;
}